diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e5e3c22d19..41f988e5b0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -126,7 +126,7 @@ jobs: - name: Install system dependencies. run: | sudo apt-get update - sudo apt-get install -y curl pandoc unzip + sudo apt-get install -y curl unzip - name: Install showcase run: | sudo mkdir -p /usr/src/showcase @@ -174,7 +174,7 @@ jobs: - name: Install system dependencies. run: | sudo apt-get update - sudo apt-get install -y curl pandoc unzip + sudo apt-get install -y curl unzip - name: Install nox. run: python -m pip install nox - name: Install protoc. @@ -220,7 +220,7 @@ jobs: - name: Install system dependencies. run: | sudo apt-get update - sudo apt-get install -y curl pandoc unzip + sudo apt-get install -y curl unzip - name: Install protoc. run: | sudo mkdir -p /usr/src/protoc/ @@ -248,7 +248,7 @@ jobs: - name: Install system dependencies. run: | sudo apt-get update - sudo apt-get install -y curl pandoc unzip + sudo apt-get install -y curl unzip - name: Install protoc. run: | sudo mkdir -p /usr/src/protoc/ @@ -276,7 +276,7 @@ jobs: - name: Install system dependencies. run: | sudo apt-get update - sudo apt-get install -y curl pandoc unzip + sudo apt-get install -y curl unzip - name: Install protoc. run: | sudo mkdir -p /usr/src/protoc/ @@ -302,7 +302,7 @@ jobs: - name: Install system dependencies. run: | sudo apt-get update - sudo apt-get install -y curl pandoc unzip + sudo apt-get install -y curl unzip - name: Install nox. run: python -m pip install nox - name: Check autogenerated snippets. @@ -323,10 +323,6 @@ jobs: python-version: "${{ matrix.python }}" cache: 'pip' allow-prereleases: true - - name: Install pandoc - run: | - sudo apt-get update - sudo apt-get install -y pandoc gcc git - name: Install nox. run: | python -m pip install nox @@ -349,10 +345,6 @@ jobs: python-version: "${{ matrix.python }}" cache: 'pip' allow-prereleases: true - - name: Install pandoc - run: | - sudo apt-get update - sudo apt-get install -y pandoc gcc git - name: Install nox. run: | python -m pip install nox diff --git a/BUILD.bazel b/BUILD.bazel index 4062c585ca..7ea0798be8 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,56 +1,6 @@ -load("//:gapic_generator_python.bzl", "pandoc_binary", "pandoc_toolchain") load("@gapic_generator_python_pip_deps//:requirements.bzl", "requirement") load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair") -toolchain_type( - name = "pandoc_toolchain_type", - visibility = ["//visibility:public"], -) - -pandoc_toolchain( - exec_compatible_with = [ - "@platforms//os:linux", - "@platforms//cpu:arm64", - ], - platform = "linux_arm_64", -) - -pandoc_toolchain( - exec_compatible_with = [ - "@platforms//os:linux", - "@platforms//cpu:x86_64", - ], - platform = "linux_x86_64", -) - -pandoc_toolchain( - exec_compatible_with = [ - "@platforms//os:osx", - "@platforms//cpu:arm64", - ], - platform = "macOS_arm_64", -) - -pandoc_toolchain( - exec_compatible_with = [ - "@platforms//os:osx", - "@platforms//cpu:x86_64", - ], - platform = "macOS_x86_64", -) - -pandoc_toolchain( - exec_compatible_with = [ - "@platforms//os:windows", - "@platforms//cpu:x86_64", - ], - platform = "windows_x86_64", -) - -pandoc_binary( - name = "pandoc_binary", -) - py_runtime( name = "pyenv3_runtime", interpreter = ":pyenv3wrapper.sh", @@ -71,11 +21,11 @@ toolchain( py_binary( name = "gapic_plugin", srcs = glob(["gapic/**/*.py"]), - data = [":pandoc_binary"] + glob([ + data = glob([ "gapic/**/*.j2", "gapic/**/.*.j2", ]), - main = "gapic/cli/generate_with_pandoc.py", + main = "gapic/cli/generate_gapic.py", python_version = "PY3", visibility = ["//visibility:public"], deps = [ @@ -86,7 +36,6 @@ py_binary( requirement("googleapis-common-protos"), requirement("jinja2"), requirement("MarkupSafe"), - requirement("pypandoc"), requirement("PyYAML"), requirement("grpc-google-iam-v1"), ], diff --git a/WORKSPACE b/WORKSPACE index 4da1de3cc7..77f907ed09 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -53,12 +53,10 @@ install_deps() load( "//:repositories.bzl", "gapic_generator_python", - "gapic_generator_register_toolchains", ) gapic_generator_python() -gapic_generator_register_toolchains() _grpc_version = "1.71.0" diff --git a/docs/getting-started/local.rst b/docs/getting-started/local.rst index e86ba51797..e82ce1f4da 100644 --- a/docs/getting-started/local.rst +++ b/docs/getting-started/local.rst @@ -48,19 +48,6 @@ To ensure it is installed propertly: libprotoc 3.6.0 -pandoc -~~~~~~ - -This generator relies on `pandoc`_ to convert from Markdown (the *lingua -franca* for documentation in protocol buffers) into ReStructured Text (the -*lingua franca* for documentation in Python). - -Install this using an appropriate mechanism for your operating system. -Multiple installation paths are documented on the `pandoc installation page`_. - -.. _pandoc: https://pandoc.org/ -.. _pandoc installation page: https://pandoc.org/installing.html - API Generator for Python ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/gapic/cli/generate_with_pandoc.py b/gapic/cli/generate_gapic.py similarity index 73% rename from gapic/cli/generate_with_pandoc.py rename to gapic/cli/generate_gapic.py index f8b444b6b8..01991c6322 100644 --- a/gapic/cli/generate_with_pandoc.py +++ b/gapic/cli/generate_gapic.py @@ -2,9 +2,6 @@ import sys if __name__ == "__main__": - os.environ["PYPANDOC_PANDOC"] = os.path.join( - os.path.abspath(__file__).rsplit("gapic", 1)[0], "pandoc" - ) os.environ["LC_ALL"] = "C.UTF-8" os.environ["PYTHONNOUSERSITE"] = "True" diff --git a/gapic/utils/rst.py b/gapic/utils/rst.py index a77df30332..edcff9b311 100644 --- a/gapic/utils/rst.py +++ b/gapic/utils/rst.py @@ -15,8 +15,6 @@ import re from typing import Optional -import pypandoc # type: ignore - from gapic.utils.lines import wrap @@ -43,29 +41,12 @@ def rst( Returns: str: The same text, in RST format. """ - # Quick check: If the text block does not appear to have any formatting, - # do not convert it. - # (This makes code generation significantly faster; calling out to pandoc - # is by far the most expensive thing we do.) - if not re.search(r"[|*`_[\]]", text): - answer = wrap( - text, - indent=indent, - offset=indent + 3, - width=width - indent, - ) - else: - # Convert from CommonMark to ReStructured Text. - answer = ( - pypandoc.convert_text( - text, - "rst", - format=source_format, - extra_args=["--columns=%d" % (width - indent)], - ) - .strip() - .replace("\n", f"\n{' ' * indent}") - ) + answer = wrap( + text, + indent=indent, + offset=indent + 3, + width=width - indent, + ) # Add a newline to the end of the document if any line breaks are # already present. diff --git a/gapic_generator_python.bzl b/gapic_generator_python.bzl deleted file mode 100644 index c76f51a125..0000000000 --- a/gapic_generator_python.bzl +++ /dev/null @@ -1,62 +0,0 @@ -def _pandoc_binary_impl(ctx): - toolchain = ctx.toolchains["@gapic_generator_python//:pandoc_toolchain_type"] - output = ctx.actions.declare_file(ctx.attr.binary_name) - - script = """ - cp {input} {output} - chmod +x {output} - """.format( - input = toolchain.pandoc.files.to_list()[0].path, - output = output.path, - ) - ctx.actions.run_shell( - command = script, - inputs = toolchain.pandoc.files, - outputs = [output], - ) - return [DefaultInfo(files = depset(direct = [output]), executable = output)] - -pandoc_binary = rule( - attrs = { - "binary_name": attr.string(default = "pandoc") - }, - executable = True, - toolchains = ["@gapic_generator_python//:pandoc_toolchain_type"], - implementation = _pandoc_binary_impl, -) - -# -# Toolchains -# -def _pandoc_toolchain_info_impl(ctx): - return [ - platform_common.ToolchainInfo( - pandoc = ctx.attr.pandoc, - ), - ] - -_pandoc_toolchain_info = rule( - attrs = { - "pandoc": attr.label( - allow_single_file = True, - cfg = "host", - executable = True, - ), - }, - implementation = _pandoc_toolchain_info_impl, -) - -def pandoc_toolchain(platform, exec_compatible_with): - toolchain_info_name = "pandoc_toolchain_info_%s" % platform - _pandoc_toolchain_info( - name = toolchain_info_name, - pandoc = "@pandoc_%s//:pandoc" % platform, - visibility = ["//visibility:public"], - ) - - native.toolchain( - name = "pandoc_toolchain_%s" % platform, - exec_compatible_with = exec_compatible_with, - toolchain = toolchain_info_name, - toolchain_type = ":pandoc_toolchain_type", - ) diff --git a/repositories.bzl b/repositories.bzl index 2a593a5a75..1816e77d3f 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -1,12 +1,5 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -_PANDOC_BUILD_FILE = """ -filegroup( - name = "pandoc", - srcs = ["bin/pandoc"], - visibility = ["//visibility:public"], -)""" - def gapic_generator_python(): _maybe( @@ -25,47 +18,6 @@ def gapic_generator_python(): strip_prefix = "grpc-{}".format(_grpc_version), url = "https://github.com/grpc/grpc/archive/v{}.zip".format(_grpc_version), ) - - _maybe( - http_archive, - name = "pandoc_linux_arm_64", - build_file_content = _PANDOC_BUILD_FILE, - strip_prefix = "pandoc-3.7.0.2", - url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-arm64.tar.gz", - ) - - _maybe( - http_archive, - name = "pandoc_linux_x86_64", - build_file_content = _PANDOC_BUILD_FILE, - strip_prefix = "pandoc-3.7.0.2", - url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-amd64.tar.gz", - ) - - _maybe( - http_archive, - name = "pandoc_macOS_arm_64", - build_file_content = _PANDOC_BUILD_FILE, - strip_prefix = "pandoc-3.7.0.2", - url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-arm64-macOS.zip", - ) - - _maybe( - http_archive, - name = "pandoc_macOS_x86_64", - build_file_content = _PANDOC_BUILD_FILE, - strip_prefix = "pandoc-3.7.0.2", - url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-x86_64-macOS.zip", - ) - - _maybe( - http_archive, - name = "pandoc_windows_x86_64", - build_file_content = _PANDOC_BUILD_FILE, - strip_prefix = "pandoc-3.7.0.2", - url = "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-windows-x86_64.zip", - ) - _rules_gapic_version = "0.5.4" _maybe( http_archive, @@ -81,14 +33,6 @@ def gapic_generator_python(): urls = ["https://github.com/googleapis/googleapis/archive/{}.zip".format(_commit_sha)], ) -def gapic_generator_register_toolchains(): - native.register_toolchains( - "@gapic_generator_python//:pandoc_toolchain_linux_arm_64", - "@gapic_generator_python//:pandoc_toolchain_linux_x86_64", - "@gapic_generator_python//:pandoc_toolchain_macOS_arm_64", - "@gapic_generator_python//:pandoc_toolchain_macOS_x86_64", - "@gapic_generator_python//:pandoc_toolchain_windows_x86_64", - ) def _maybe(repo_rule, name, strip_repo_prefix = "", **kwargs): if not name.startswith(strip_repo_prefix): diff --git a/requirements.in b/requirements.in index d6a1c8d6f1..98391eb5ee 100644 --- a/requirements.in +++ b/requirements.in @@ -4,7 +4,6 @@ googleapis-common-protos jinja2 MarkupSafe protobuf -pypandoc PyYAML grpc-google-iam-v1 proto-plus diff --git a/requirements.txt b/requirements.txt index aa753841aa..9ca3c65b6c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --allow-unsafe --generate-hashes requirements.in @@ -321,9 +321,9 @@ google-api-core==2.25.1 \ --hash=sha256:8a2a56c1fef82987a524371f99f3bd0143702fecc670c72e600c1cda6bf8dbb7 \ --hash=sha256:d2aaa0b13c78c61cb3f4282c464c046e45fbd75755683c9c525e6e8f7ed0a5e8 # via -r requirements.in -google-auth==2.40.3 \ - --hash=sha256:1370d4593e86213563547f97a92752fc658456fe4514c809544f330fed45a7ca \ - --hash=sha256:500c3a29adedeb36ea9cf24b8d10858e152f2412e3ca37829b3fa18e33d63b77 +google-auth==2.41.1 \ + --hash=sha256:754843be95575b9a19c604a848a41be03f7f2afd8c019f716dc1f51ee41c639d \ + --hash=sha256:b76b7b1f9e61f0cb7e88870d14f6a94aeef248959ef6992670efee37709cbfd2 # via google-api-core googleapis-common-protos[grpc]==1.70.0 \ --hash=sha256:0e1b44e0ea153e6594f9f394fef15193a68aaaea2d843f83e2742717ca753257 \ @@ -336,58 +336,68 @@ grpc-google-iam-v1==0.14.2 \ --hash=sha256:a3171468459770907926d56a440b2bb643eec1d7ba215f48f3ecece42b4d8351 \ --hash=sha256:b3e1fc387a1a329e41672197d0ace9de22c78dd7d215048c4c78712073f7bd20 # via -r requirements.in -grpcio==1.75.0 \ - --hash=sha256:050760fd29c8508844a720f06c5827bb00de8f5e02f58587eb21a4444ad706e5 \ - --hash=sha256:06d22e1d8645e37bc110f4c589cb22c283fd3de76523065f821d6e81de33f5d4 \ - --hash=sha256:0aa795198b28807d28570c0a5f07bb04d5facca7d3f27affa6ae247bbd7f312a \ - --hash=sha256:0b85f4ebe6b56d2a512201bb0e5f192c273850d349b0a74ac889ab5d38959d16 \ - --hash=sha256:0c40f368541945bb664857ecd7400acb901053a1abbcf9f7896361b2cfa66798 \ - --hash=sha256:0c91d5b16eff3cbbe76b7a1eaaf3d91e7a954501e9d4f915554f87c470475c3d \ - --hash=sha256:0fcb77f2d718c1e58cc04ef6d3b51e0fa3b26cf926446e86c7eba105727b6cd4 \ - --hash=sha256:153c5a7655022c3626ad70be3d4c2974cb0967f3670ee49ece8b45b7a139665f \ - --hash=sha256:1bb78d052948d8272c820bb928753f16a614bb2c42fbf56ad56636991b427518 \ - --hash=sha256:1ec2937fd92b5b4598cbe65f7e57d66039f82b9e2b7f7a5f9149374057dde77d \ - --hash=sha256:1ec9cbaec18d9597c718b1ed452e61748ac0b36ba350d558f9ded1a94cc15ec7 \ - --hash=sha256:222b0851e20c04900c63f60153503e918b08a5a0fad8198401c0b1be13c6815b \ - --hash=sha256:266fa6209b68a537b2728bb2552f970e7e78c77fe43c6e9cbbe1f476e9e5c35f \ - --hash=sha256:2e8e752ab5cc0a9c5b949808c000ca7586223be4f877b729f034b912364c3964 \ - --hash=sha256:352dbdf25495eef584c8de809db280582093bc3961d95a9d78f0dfb7274023a2 \ - --hash=sha256:36764a4ad9dc1eb891042fab51e8cdf7cc014ad82cee807c10796fb708455041 \ - --hash=sha256:38d665f44b980acdbb2f0e1abf67605ba1899f4d2443908df9ec8a6f26d2ed88 \ - --hash=sha256:3a6788b30aa8e6f207c417874effe3f79c2aa154e91e78e477c4825e8b431ce0 \ - --hash=sha256:437eeb16091d31498585d73b133b825dc80a8db43311e332c08facf820d36894 \ - --hash=sha256:494dcbade5606128cb9f530ce00331a90ecf5e7c5b243d373aebdb18e503c346 \ - --hash=sha256:50a6e43a9adc6938e2a16c9d9f8a2da9dd557ddd9284b73b07bd03d0e098d1e9 \ - --hash=sha256:53067c590ac3638ad0c04272f2a5e7e32a99fec8824c31b73bc3ef93160511fa \ - --hash=sha256:55a2d5ae79cd0f68783fb6ec95509be23746e3c239290b2ee69c69a38daa961a \ - --hash=sha256:55dfb9122973cc69520b23d39867726722cafb32e541435707dc10249a1bdbc6 \ - --hash=sha256:585147859ff4603798e92605db28f4a97c821c69908e7754c44771c27b239bbd \ - --hash=sha256:597340a41ad4b619aaa5c9b94f7e6ba4067885386342ab0af039eda945c255cd \ - --hash=sha256:678b649171f229fb16bda1a2473e820330aa3002500c4f9fd3a74b786578e90f \ - --hash=sha256:68c95b1c1e3bf96ceadf98226e9dfe2bc92155ce352fa0ee32a1603040e61856 \ - --hash=sha256:6b365f37a9c9543a9e91c6b4103d68d38d5bcb9965b11d5092b3c157bd6a5ee7 \ - --hash=sha256:725e67c010f63ef17fc052b261004942763c0b18dcd84841e6578ddacf1f9d10 \ - --hash=sha256:78dcc025a144319b66df6d088bd0eda69e1719eb6ac6127884a36188f336df19 \ - --hash=sha256:7a9337ac4ce61c388e02019d27fa837496c4b7837cbbcec71b05934337e51531 \ - --hash=sha256:7ee5ee42bfae8238b66a275f9ebcf6f295724375f2fa6f3b52188008b6380faf \ - --hash=sha256:7f89d6d0cd43170a80ebb4605cad54c7d462d21dc054f47688912e8bf08164af \ - --hash=sha256:851194eec47755101962da423f575ea223c9dd7f487828fe5693920e8745227e \ - --hash=sha256:9146e40378f551eed66c887332afc807fcce593c43c698e21266a4227d4e20d2 \ - --hash=sha256:91fbfc43f605c5ee015c9056d580a70dd35df78a7bad97e05426795ceacdb59f \ - --hash=sha256:9880c323595d851292785966cadb6c708100b34b163cab114e3933f5773cba2d \ - --hash=sha256:9dc4a02796394dd04de0b9673cb79a78901b90bb16bf99ed8cb528c61ed9372e \ - --hash=sha256:b989e8b09489478c2d19fecc744a298930f40d8b27c3638afbfe84d22f36ce4e \ - --hash=sha256:bb58e38a50baed9b21492c4b3f3263462e4e37270b7ea152fc10124b4bd1c318 \ - --hash=sha256:c2c39984e846bd5da45c5f7bcea8fafbe47c98e1ff2b6f40e57921b0c23a52d0 \ - --hash=sha256:c8cfc780b7a15e06253aae5f228e1e84c0d3c4daa90faf5bc26b751174da4bf9 \ - --hash=sha256:ca123db0813eef80625a4242a0c37563cb30a3edddebe5ee65373854cf187215 \ - --hash=sha256:cb6c5b075c2d092f81138646a755f0dad94e4622300ebef089f94e6308155d82 \ - --hash=sha256:dce15597ca11913b78e1203c042d5723e3ea7f59e7095a1abd0621be0e05b895 \ - --hash=sha256:eafbe3563f9cb378370a3fa87ef4870539cf158124721f3abee9f11cd8162460 \ - --hash=sha256:ee16e232e3d0974750ab5f4da0ab92b59d6473872690b5e40dcec9a22927f22e \ - --hash=sha256:fa35ccd9501ffdd82b861809cbfc4b5b13f4b4c5dc3434d2d9170b9ed38a9054 \ - --hash=sha256:fb64dd62face3d687a7b56cd881e2ea39417af80f75e8b36f0f81dfd93071651 \ - --hash=sha256:ffc33e67cab6141c54e75d85acd5dec616c5095a957ff997b4330a6395aa9b51 +grpcio==1.75.1 \ + --hash=sha256:0049a7bf547dafaeeb1db17079ce79596c298bfe308fc084d023c8907a845b9a \ + --hash=sha256:030a6164bc2ca726052778c0cf8e3249617a34e368354f9e6107c27ad4af8c28 \ + --hash=sha256:06373a94fd16ec287116a825161dca179a0402d0c60674ceeec8c9fba344fe66 \ + --hash=sha256:07a554fa31c668cf0e7a188678ceeca3cb8fead29bbe455352e712ec33ca701c \ + --hash=sha256:0ee119f4f88d9f75414217823d21d75bfe0e6ed40135b0cbbfc6376bc9f7757d \ + --hash=sha256:1712b5890b22547dd29f3215c5788d8fc759ce6dd0b85a6ba6e2731f2d04c088 \ + --hash=sha256:259526a7159d39e2db40d566fe3e8f8e034d0fb2db5bf9c00e09aace655a4c2b \ + --hash=sha256:2720c239c1180eee69f7883c1d4c83fc1a495a2535b5fa322887c70bf02b16e8 \ + --hash=sha256:3652516048bf4c314ce12be37423c79829f46efffb390ad64149a10c6071e8de \ + --hash=sha256:36990d629c3c9fb41e546414e5af52d0a7af37ce7113d9682c46d7e2919e4cca \ + --hash=sha256:3bed22e750d91d53d9e31e0af35a7b0b51367e974e14a4ff229db5b207647884 \ + --hash=sha256:3d86880ecaeb5b2f0a8afa63824de93adb8ebe4e49d0e51442532f4e08add7d6 \ + --hash=sha256:3e71a2105210366bfc398eef7f57a664df99194f3520edb88b9c3a7e46ee0d64 \ + --hash=sha256:3e81d89ece99b9ace23a6916880baca613c03a799925afb2857887efa8b1b3d2 \ + --hash=sha256:4484f4b7287bdaa7a5b3980f3c7224c3c622669405d20f69549f5fb956ad0421 \ + --hash=sha256:44b62345d8403975513af88da2f3d5cc76f73ca538ba46596f92a127c2aea945 \ + --hash=sha256:491444c081a54dcd5e6ada57314321ae526377f498d4aa09d975c3241c5b9e1c \ + --hash=sha256:4b4c678e7ed50f8ae8b8dbad15a865ee73ce12668b6aaf411bf3258b5bc3f970 \ + --hash=sha256:4b7177a1cdb3c51b02b0c0a256b0a72fdab719600a693e0e9037949efffb200b \ + --hash=sha256:4e1c28f51c1cf67eccdfc1065e8e866c9ed622f09773ca60947089c117f848a1 \ + --hash=sha256:52015cf73eb5d76f6404e0ce0505a69b51fd1f35810b3a01233b34b10baafb41 \ + --hash=sha256:5573f51e3f296a1bcf71e7a690c092845fb223072120f4bdb7a5b48e111def66 \ + --hash=sha256:573855ca2e58e35032aff30bfbd1ee103fbcf4472e4b28d4010757700918e326 \ + --hash=sha256:5a2acda37fc926ccc4547977ac3e56b1df48fe200de968e8c8421f6e3093df6c \ + --hash=sha256:5b8ea230c7f77c0a1a3208a04a1eda164633fb0767b4cefd65a01079b65e5b1f \ + --hash=sha256:5b8f381eadcd6ecaa143a21e9e80a26424c76a0a9b3d546febe6648f3a36a5ac \ + --hash=sha256:5bf4001d3293e3414d0cf99ff9b1139106e57c3a66dfff0c5f60b2a6286ec133 \ + --hash=sha256:5cebe13088b9254f6e615bcf1da9131d46cfa4e88039454aca9cb65f639bd3bc \ + --hash=sha256:61c692fb05956b17dd6d1ab480f7f10ad0536dba3bc8fd4e3c7263dc244ed772 \ + --hash=sha256:62ce42d9994446b307649cb2a23335fa8e927f7ab2cbf5fcb844d6acb4d85f9c \ + --hash=sha256:664eecc3abe6d916fa6cf8dd6b778e62fb264a70f3430a3180995bf2da935446 \ + --hash=sha256:67697efef5a98d46d5db7b1720fa4043536f8b8e5072a5d61cfca762f287e939 \ + --hash=sha256:683cfc70be0c1383449097cba637317e4737a357cfc185d887fd984206380403 \ + --hash=sha256:6a4996a2c8accc37976dc142d5991adf60733e223e5c9a2219e157dc6a8fd3a2 \ + --hash=sha256:73577a93e692b3474b1bfe84285d098de36705dbd838bb4d6a056d326e4dc880 \ + --hash=sha256:745c5fe6bf05df6a04bf2d11552c7d867a2690759e7ab6b05c318a772739bd75 \ + --hash=sha256:7b888b33cd14085d86176b1628ad2fcbff94cfbbe7809465097aa0132e58b018 \ + --hash=sha256:7d4fa6ccc3ec2e68a04f7b883d354d7fea22a34c44ce535a2f0c0049cf626ddf \ + --hash=sha256:7e21400b037be29545704889e72e586c238e346dcb2d08d8a7288d16c883a9ec \ + --hash=sha256:8679aa8a5b67976776d3c6b0521e99d1c34db8a312a12bcfd78a7085cb9b604e \ + --hash=sha256:8775036efe4ad2085975531d221535329f5dac99b6c2a854a995456098f99546 \ + --hash=sha256:8d04e101bba4b55cea9954e4aa71c24153ba6182481b487ff376da28d4ba46cf \ + --hash=sha256:9f82ff474103e26351dacfe8d50214e7c9322960d8d07ba7fa1d05ff981c8b2d \ + --hash=sha256:9fe51e4a1f896ea84ac750900eae34d9e9b896b5b1e4a30b02dc31ad29f36383 \ + --hash=sha256:a8041d2f9e8a742aeae96f4b047ee44e73619f4f9d24565e84d5446c623673b6 \ + --hash=sha256:aad1c774f4ebf0696a7f148a56d39a3432550612597331792528895258966dc0 \ + --hash=sha256:b10ad908118d38c2453ade7ff790e5bce36580c3742919007a2a78e3a1e521ca \ + --hash=sha256:b1e191c5c465fa777d4cafbaacf0c01e0d5278022082c0abbd2ee1d6454ed94d \ + --hash=sha256:b1ea1bbe77ecbc1be00af2769f4ae4a88ce93be57a4f3eebd91087898ed749f9 \ + --hash=sha256:bb658f703468d7fbb5dcc4037c65391b7dc34f808ac46ed9136c24fc5eeb041d \ + --hash=sha256:c05da79068dd96723793bffc8d0e64c45f316248417515f28d22204d9dae51c7 \ + --hash=sha256:c09fba33327c3ac11b5c33dbdd8218eef8990d78f83b1656d628831812a8c0fb \ + --hash=sha256:c12121e509b9f8b0914d10054d24120237d19e870b1cd82acbb8a9b9ddd198a3 \ + --hash=sha256:c32193fa08b2fbebf08fe08e84f8a0aad32d87c3ad42999c65e9449871b1c66e \ + --hash=sha256:ce08d4e112d0d38487c2b631ec8723deac9bc404e9c7b1011426af50a79999e4 \ + --hash=sha256:cf2e760978dcce7ff7d465cbc7e276c3157eedc4c27aa6de7b594c7a295d3d61 \ + --hash=sha256:d6be2b5ee7bea656c954dcf6aa8093c6f0e6a3ef9945c99d99fcbfc88c5c0bfe \ + --hash=sha256:e19e7dfa0d7ca7dea22be464339e18ac608fd75d88c56770c646cdabe54bc724 \ + --hash=sha256:e5b425aee54cc5e3e3c58f00731e8a33f5567965d478d516d35ef99fd648ab68 \ + --hash=sha256:f4b29b9aabe33fed5df0a85e5f13b09ff25e2c05bd5946d25270a8bd5682dac9 \ + --hash=sha256:f86e92275710bea3000cb79feca1762dc0ad3b27830dd1a74e82ab321d4ee464 # via # googleapis-common-protos # grpc-google-iam-v1 @@ -409,135 +419,163 @@ jinja2==3.1.6 \ --hash=sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d \ --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67 # via -r requirements.in -libcst==1.8.4 \ - --hash=sha256:0352c7d662c89243e730a28edf41577f87e28649c18ee365dd373c5fbdab2434 \ - --hash=sha256:056733760ba5ac1fd4cd518cddd5a43b3adbe2e0f6c7ce02532a114f7cd5d85b \ - --hash=sha256:062e424042c36a102abd11d8e9e27ac6be68e1a934b0ecfc9fb8fea017240d2f \ - --hash=sha256:074a3b17e270237fb36d3b94d7492fb137cb74217674484ba25e015e8d3d8bdc \ - --hash=sha256:114343271f70a79e6d08bc395f5dfa150227341fab646cc0a58e80550e7659b7 \ - --hash=sha256:14bda1e4ea0b04d3926d41f6dafbfd311a951b75a60fe0d79bb5a8249c1cef5b \ - --hash=sha256:1d468514a21cf3444dc3f3a4b1effc6c05255c98cc79e02af394652d260139f0 \ - --hash=sha256:259737faf90552a0589d95393dcaa3d3028be03ab3ea87478d46a1a4f922dd91 \ - --hash=sha256:27eeb16edb7dc0711d67e28bb8c0288e4147210aeb2434f08c16ac5db6b559e5 \ - --hash=sha256:2b1e570ba816da408b5ee40ac479b34e56d995bf32dcca6f0ddb3d69b08e77de \ - --hash=sha256:2c6d8f7087e9eaf005efde573f3f36d1d40366160155c195a6c4230d4c8a5839 \ - --hash=sha256:2d71e7e5982776f78cca9102286bb0895ef6f7083f76c0c9bc5ba4e9e40aee38 \ - --hash=sha256:2e156760fc741bbf2fa68f4e3b15f019e924ea852f02276d0a53b7375cf70445 \ - --hash=sha256:2e24d11a1be0b1791f7bace9d406f5a70b8691ef77be377b606950803de4657d \ - --hash=sha256:2fcff2130824f2cb5f4fd9c4c74fb639c5f02bc4228654461f6dc6b1006f20c0 \ - --hash=sha256:33664117fcb2913fdbd7de07a009193b660a16e7af18f7c1b4449e428f3b0f95 \ - --hash=sha256:3ad7f0a32ddcdff00a3eddfd35cfd8485d9f357a32e4c67558476570199f808f \ - --hash=sha256:3de575f0b5b466f2e9656b963f5848103cc518c6f3581902c6f430b07864584f \ - --hash=sha256:3eeba4edb40b2291c2460fe8d7e43f47e5fcc33f186675db5d364395adca3401 \ - --hash=sha256:43cbb6b41bc2c4785136f59a66692287d527aeb022789c4af44ad6e85b7b2baa \ - --hash=sha256:4a718e5f6b398a07ca5d533e6593c1590d69fe65c539323281959733d6d541dd \ - --hash=sha256:4b1cbadd988fee59b25ea154708cfed99cfaf45f9685707be422ad736371a9fe \ - --hash=sha256:52c9376ba11ede5430e40aa205101dfc41202465103c6540f24591f898afb3d6 \ - --hash=sha256:5db0b484670aac7ea442213afaa9addb1de0d9540a34ad44d376bec12242bc3a \ - --hash=sha256:5f167bf83dce662c9b499f1ea078ec2f2fee138e80f7d7dbd59c89ed28dc935f \ - --hash=sha256:64cc34d74c9543b30ec3d7481dd644cb1bb3888076b486592d7fa0f22632f1c6 \ - --hash=sha256:65364c214251ed5720f3f6d0c4ef1338aac91ad4bbc5d30253eac21832b0943a \ - --hash=sha256:6840e4011b583e9b7a71c00e7ab4281aea7456877b3ea6ecedb68a39a000bc64 \ - --hash=sha256:69b672c1afac5fe00d689f585ba57ac5facc4632f39b977d4b3e4711571c76e2 \ - --hash=sha256:6cc8b7e33f6c4677e220dd7025e1e980da4d3f497b9b8ee0320e36dd54597f68 \ - --hash=sha256:71e12101ef2a6e05b7610badb2bfa597379289f1408e305a8d19faacdb872f47 \ - --hash=sha256:7832ee448fbdf18884a1f9af5fba1be6d5e98deb560514d92339fd6318aef651 \ - --hash=sha256:783f52b7c8d82046f0d93812f62a25eb82c3834f198e6cbfd5bb03ca68b593c8 \ - --hash=sha256:7fe97d432d95b6bcb1694a6d0fa7e07dde8fa687a637958126410ee2ced94b81 \ - --hash=sha256:846aad04bac624a42d182add526d019e417e6a2b8a4c0bf690d32f9e1f3075ff \ - --hash=sha256:870a49df8575c11ea4f5319d54750f95d2d06370a263bd42d924a9cf23cf0cbe \ - --hash=sha256:873dd4e8b896f7cb0e78118badda55ec1f42e9301a4a948cc438955ff3ae2257 \ - --hash=sha256:8e7baaa6f01b6b6ea4b28d60204fddc679a3cd56d312beee200bd5f8f9711f0b \ - --hash=sha256:8e8d5158f976a5ee140ad0d3391e1a1b84b2ce5da62f16e48feab4bc21b91967 \ - --hash=sha256:929798ca38ea76a5056f725221d66c6923e749caa9fa7f4cc86e914a3698493d \ - --hash=sha256:93c76ab41d736b66d6fb3df32cd33184eed17666d7dc3ce047cf7ccdfe80b5b1 \ - --hash=sha256:9a5cd7beef667e5de3c5fb0ec387dc19aeda5cd4606ff541d0e8613bb3ef3b23 \ - --hash=sha256:9be5b1b7d416900ff9bcdb4945692e6252fdcbd95514e98439f81568568c9e02 \ - --hash=sha256:a179c712f38acb85e81d8949e80e05a422c92dcf5a00d8f4976f7e547a9f0916 \ - --hash=sha256:a334dd11cdea34275df91c2ae9cc5933ec7e0ad5698264966708d637d110b627 \ - --hash=sha256:a4270123c988e130cec94bfe1b54d34784a40b34b2d5ac0507720c1272bd3209 \ - --hash=sha256:a65e3c409ef16ae369600d085d23a3897d4fccf4fdcc09294a402c513ac35906 \ - --hash=sha256:a90c80e4d89222e11c7a734bc1b7f930bc2aba7750ad149bde1b136f839ea788 \ - --hash=sha256:b376ef7fa30bef611d4fb32af1da0e767b801b00322028a874ab3a441686b6a9 \ - --hash=sha256:b69e94625702825309fd9e50760e77a5a60bd1e7a8e039862c8dd3011a6e1530 \ - --hash=sha256:c9c775bc473225a0ad8422150fd9cf18ed2eebd7040996772937ac558f294d6c \ - --hash=sha256:cb188ebd4114144e14f6beb5499e43bebd0ca3ce7f2beb20921d49138c67b814 \ - --hash=sha256:d011d731c2e673fbd9c84794418230a913ae3c98fc86f27814612b6b6d53d26b \ - --hash=sha256:d130f3e2d40c5f48cbbc804710ddf5b4db9dd7c0118f3b35f109164a555860d2 \ - --hash=sha256:d3d4111f971632e9ddf8191aeef4576595e18ef3fa7b3016bfe15a08fa8554df \ - --hash=sha256:e4c5055e255d12745c7cc60fb5fb31c0f82855864c15dc9ad33a44f829b92600 \ - --hash=sha256:e6f309c0f42e323c527d8c9007f583fd1668e45884208184a70644d916f27829 \ - --hash=sha256:ea74c56cb11a1fdca9f8ab258965adce23e049ef525fdcc5c254a093e3de25cb \ - --hash=sha256:eff724c17df10e059915000eaf59f4e79998b66a7d35681e934a9a48667df931 \ - --hash=sha256:f0f105d32c49baf712df2be360d496de67a2375bcf4e9707e643b7efc2f9a55a \ - --hash=sha256:f5bd0bcdd2a8da9dad47d36d71757d8ba87baf887ae6982e2cb8621846610c49 \ - --hash=sha256:fa870f34018c7241ee9227723cac0787599a2a8a2bfd53eacfbbe1ea1a272ae6 \ - --hash=sha256:fbadca1bc31f696875c955080c407a40b2d1aa7f79ca174a65dcb0542a57db6c \ - --hash=sha256:fceb17616f1afe528c88243e3e7f78f84f0cc287463f04f3c1243e20a469e869 \ - --hash=sha256:fedfd33e5dda2200d582554e6476626d4706aa1fa2794bfb271879f8edff89b9 +libcst==1.8.5 \ + --hash=sha256:08762c19eaf3d72162150ac0f0e1aa70378a10182ee539b8ecdf55c7f83b7f82 \ + --hash=sha256:0abf0e87570cd3b06a8cafbb5378a9d1cbf12e4583dc35e0fff2255100da55a1 \ + --hash=sha256:0ade64fbbeae77b5f2cf0b4fd62afa51c56f51fa026eb1f1627e65ec6d2e38d7 \ + --hash=sha256:0b95db09d04d125619a63f191c9534853656c4c76c303b8b4c5f950c8e610fba \ + --hash=sha256:0ba728c7aee73b330f49f2df0f0b56b74c95302eeb78860f8d5ff0e0fc52c887 \ + --hash=sha256:0f504d06dfba909d1ba6a4acf60bfe3f22275444d6e0d07e472a5da4a209b0be \ + --hash=sha256:197c2f86dd0ca5c6464184ddef7f6440d64c8da39b78d16fc053da6701ed1209 \ + --hash=sha256:20354c4217e87afea936e9ea90c57fe0b2c5651f41b3ee59f5df8a53ab417746 \ + --hash=sha256:26e9d5e756447873eeda78441fa7d1fe640c0b526e5be2b6b7ee0c8f03c4665f \ + --hash=sha256:271b0b363972ff7d2b8116add13977e7c3b2668c7a424095851d548d222dab18 \ + --hash=sha256:27c7733aba7b43239157661207b1e3a9f3711a7fc061a0eca6a33f0716fdfd21 \ + --hash=sha256:31d86025d8997c853f85c4b5d494f04a157fb962e24f187b4af70c7755c9b27d \ + --hash=sha256:373011a1a995c6201cf76c72ab598cedc27de9a5d665428620610f599bfc5f20 \ + --hash=sha256:39130e59868b8fa49f6eeedd46f008d3456fc13ded57e1c85b211636eb6425f3 \ + --hash=sha256:395aa10f34b91c952098eb69fc461f17fcda4e1dc4ac462c3bdff2d4dfbb92e7 \ + --hash=sha256:3a3c967725cc3e8fa5c7251188d57d48eec8835f44c6b53f7523992bec595fa0 \ + --hash=sha256:3b7e5142768418094fb8f673e107f01cfdfa70b72d6c97749f3619e2e8beacb1 \ + --hash=sha256:3d8e80cd1ed6577166f0bab77357f819f12564c2ed82307612e2bcc93e684d72 \ + --hash=sha256:3e409c0784d0950b16555799bfa108199209b7df159d84ebe443fe08aa0ba8f6 \ + --hash=sha256:4ad060e43bd3ba54b4fefcc5f619fc2480fd5a7dbec6768b598bfe0eb46e3da9 \ + --hash=sha256:4f43915cd523a6967ba1dfe137627ed3804892005330c3bf53674a2ab4ff3dad \ + --hash=sha256:50e095d18c4f76da0e03f25c50b52a2999acbcbe4598a3cf41842ee3c13b54f1 \ + --hash=sha256:54a50034c29d477fd3ceed2bcc02e17142b354e4039831246c32fde59281d116 \ + --hash=sha256:588acde1588544b3bfe06069c118ee731e6712f323f26a026733f0ec4512596e \ + --hash=sha256:5e6cd3df72d47701b205fa3349ba8899566df82cef248c2fdf5f575d640419c4 \ + --hash=sha256:60e62e966b45b7dee6f0ec0fd7687704d29be18ae670c5bc6c9c61a12ccf589f \ + --hash=sha256:61d56839d237e9bf3310e6479ffaf6659f298940f0e0d2460ce71ee67a5375df \ + --hash=sha256:62d19557e9ca8c4d4969e4139f6678ee36beacce5a1dddbdb8f891e7fb867e84 \ + --hash=sha256:63405cb548b2d7b78531535a7819231e633b13d3dee3eb672d58f0f3322892ca \ + --hash=sha256:667ec0b245b8fa1e4afaa69ab4640ff124d4f5e7a480196fedde705db69b8c56 \ + --hash=sha256:6dc28d33ab8750a84c28b5625f7916846ecbecefd89bf75a5292a35644b6efbd \ + --hash=sha256:71b2b1ef2305cba051252342a1a4f8e94e6b8e95d7693a7c15a00ce8849ef722 \ + --hash=sha256:757390c3cf0b45d7ae1d1d4070c839b082926e762e65eab144f37a63ad33b939 \ + --hash=sha256:774df1b40d338d245bb2d4e368ed99feb72a4642984125a5db62a3f4013a6e87 \ + --hash=sha256:7cbb330a352dde570059c73af7b7bbfaa84ae121f54d2ce46c5530351f57419d \ + --hash=sha256:8a5921105610f35921cc4db6fa5e68e941c6da20ce7f9f93b41b6c66b5481353 \ + --hash=sha256:8da9e9563dcd754b65557ba9cdff9a5af32cfa5f007be0db982429580db45bfe \ + --hash=sha256:970b7164a71c65e13c961965f9677bbbbeb21ce2e7e6655294f7f774156391c4 \ + --hash=sha256:985303bbc3c748c8fb71f994b56cc2806385b423acd53f5dd1cc191b3c2df6d3 \ + --hash=sha256:9a756bd314b87b87dec9f0f900672c37719645b1c8bb2b53fe37b5b5fe7ee2c2 \ + --hash=sha256:9e431d331f4296090325dc22bc4e9e4a32aff08d51ee31053b7efff16faf87fc \ + --hash=sha256:a026aaa19cb2acd8a4d9e2a215598b0a7e2c194bf4482eb9dec4d781ec6e10b2 \ + --hash=sha256:a7b1cc3abfdba5ce36907f94f07e079528d4be52c07dfffa26f0e68eb1d25d45 \ + --hash=sha256:a80e14836ecbdf5374c2c82cd5cd290abaa7290ecfafe9259d0615a1ebccb30c \ + --hash=sha256:a8146f945f1eb46406fab676f86de3b7f88aca9e5d421f6366f7a63c8a950254 \ + --hash=sha256:aaad71a6079eb9ebe84f982bb0ccebd4f5010f5f18c6324690b73efc4427b3fa \ + --hash=sha256:abded10e8d92462fa982d19b064c6f24ed7ead81cf3c3b71011e9764cb12923d \ + --hash=sha256:b084769dcda2036265fc426eec5894c658af8d4b0e0d0255ab6bb78c8c9d6eb4 \ + --hash=sha256:b5b33ec61f62ff6122dc9c5bf1401bc8a9f9a2f0663ca15661d21d14d9dc4de0 \ + --hash=sha256:b7de38b9b6c24825d028be70ec12745d268a763d2fb89344f65db749be13733f \ + --hash=sha256:b873caf04862b6649a2a961fce847f7515ba882be02376a924732cf82c160861 \ + --hash=sha256:b8c3cfbbf6049e3c587713652e4b3c88cfbf7df7878b2eeefaa8dd20a48dc607 \ + --hash=sha256:c20384b8a4a7801b4416ef96173f1fbb7fafad7529edfdf151811ef70423118a \ + --hash=sha256:c5ca109c9a81dff3d947dceba635a08f9c3dfeb7f61b0b824a175ef0a98ea69b \ + --hash=sha256:c69d2b39e360dea5490ccb5dcf5957dcbb1067d27dc1f3f0787d4e287f7744e2 \ + --hash=sha256:cd389a8a1da7cd48f47e72606153548de1a4aae7914c6af6302bcd3095bc592d \ + --hash=sha256:dd5a292ce2b6410bc100aeac2b18ba3554fd8a8f6aa0ee6a9238bb4031c521ca \ + --hash=sha256:dd7bdb14545c4b77a6c0eb39c86a76441fe833da800f6ca63e917e1273621029 \ + --hash=sha256:e72e1816eed63f530668e93a4c22ff1cf8b91ddce0ec53e597d3f6c53e103ec7 \ + --hash=sha256:e8204607504563d3606bbaea2b9b04e0cef2b3bdc14c89171a702c1e09b9318a \ + --hash=sha256:eed454ab77f4b18100c41d8973b57069e503943ea4e5e5bbb660404976a0fe7a \ + --hash=sha256:f350ff2867b3075ba97a022de694f2747c469c25099216cef47b58caaee96314 \ + --hash=sha256:f8934763389cd21ce3ed229b63b994b79dac8be7e84a9da144823f46bc1ffc5c \ + --hash=sha256:fd74c543770e6a61dcb8846c9689dfcce2ad686658896f77f3e21b6ce94bcb2e \ + --hash=sha256:ff9c535cfe99f0be79ac3024772b288570751fc69fc472b44fca12d1912d1561 # via -r requirements.in -markupsafe==3.0.2 \ - --hash=sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4 \ - --hash=sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30 \ - --hash=sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0 \ - --hash=sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9 \ - --hash=sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396 \ - --hash=sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13 \ - --hash=sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028 \ - --hash=sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca \ - --hash=sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557 \ - --hash=sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832 \ - --hash=sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0 \ - --hash=sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b \ - --hash=sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579 \ - --hash=sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a \ - --hash=sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c \ - --hash=sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff \ - --hash=sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c \ - --hash=sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22 \ - --hash=sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094 \ - --hash=sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb \ - --hash=sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e \ - --hash=sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5 \ - --hash=sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a \ - --hash=sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d \ - --hash=sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a \ - --hash=sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b \ - --hash=sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8 \ - --hash=sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225 \ - --hash=sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c \ - --hash=sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144 \ - --hash=sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f \ - --hash=sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87 \ - --hash=sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d \ - --hash=sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93 \ - --hash=sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf \ - --hash=sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158 \ - --hash=sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84 \ - --hash=sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb \ - --hash=sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48 \ - --hash=sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171 \ - --hash=sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c \ - --hash=sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6 \ - --hash=sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd \ - --hash=sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d \ - --hash=sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1 \ - --hash=sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d \ - --hash=sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca \ - --hash=sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a \ - --hash=sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29 \ - --hash=sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe \ - --hash=sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798 \ - --hash=sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c \ - --hash=sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8 \ - --hash=sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f \ - --hash=sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f \ - --hash=sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a \ - --hash=sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178 \ - --hash=sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0 \ - --hash=sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79 \ - --hash=sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430 \ - --hash=sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50 +markupsafe==3.0.3 \ + --hash=sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f \ + --hash=sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a \ + --hash=sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf \ + --hash=sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19 \ + --hash=sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf \ + --hash=sha256:0f4b68347f8c5eab4a13419215bdfd7f8c9b19f2b25520968adfad23eb0ce60c \ + --hash=sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175 \ + --hash=sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219 \ + --hash=sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb \ + --hash=sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6 \ + --hash=sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab \ + --hash=sha256:15d939a21d546304880945ca1ecb8a039db6b4dc49b2c5a400387cdae6a62e26 \ + --hash=sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1 \ + --hash=sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce \ + --hash=sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218 \ + --hash=sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634 \ + --hash=sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695 \ + --hash=sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad \ + --hash=sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73 \ + --hash=sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c \ + --hash=sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe \ + --hash=sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa \ + --hash=sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559 \ + --hash=sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa \ + --hash=sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37 \ + --hash=sha256:3537e01efc9d4dccdf77221fb1cb3b8e1a38d5428920e0657ce299b20324d758 \ + --hash=sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f \ + --hash=sha256:38664109c14ffc9e7437e86b4dceb442b0096dfe3541d7864d9cbe1da4cf36c8 \ + --hash=sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d \ + --hash=sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c \ + --hash=sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97 \ + --hash=sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a \ + --hash=sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19 \ + --hash=sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9 \ + --hash=sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9 \ + --hash=sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc \ + --hash=sha256:591ae9f2a647529ca990bc681daebdd52c8791ff06c2bfa05b65163e28102ef2 \ + --hash=sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4 \ + --hash=sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354 \ + --hash=sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50 \ + --hash=sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698 \ + --hash=sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9 \ + --hash=sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b \ + --hash=sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc \ + --hash=sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115 \ + --hash=sha256:7c3fb7d25180895632e5d3148dbdc29ea38ccb7fd210aa27acbd1201a1902c6e \ + --hash=sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485 \ + --hash=sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f \ + --hash=sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12 \ + --hash=sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025 \ + --hash=sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009 \ + --hash=sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d \ + --hash=sha256:949b8d66bc381ee8b007cd945914c721d9aba8e27f71959d750a46f7c282b20b \ + --hash=sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a \ + --hash=sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5 \ + --hash=sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f \ + --hash=sha256:a320721ab5a1aba0a233739394eb907f8c8da5c98c9181d1161e77a0c8e36f2d \ + --hash=sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1 \ + --hash=sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287 \ + --hash=sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6 \ + --hash=sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f \ + --hash=sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581 \ + --hash=sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed \ + --hash=sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b \ + --hash=sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c \ + --hash=sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026 \ + --hash=sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8 \ + --hash=sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676 \ + --hash=sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6 \ + --hash=sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e \ + --hash=sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d \ + --hash=sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d \ + --hash=sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01 \ + --hash=sha256:df2449253ef108a379b8b5d6b43f4b1a8e81a061d6537becd5582fba5f9196d7 \ + --hash=sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419 \ + --hash=sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795 \ + --hash=sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1 \ + --hash=sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5 \ + --hash=sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d \ + --hash=sha256:e8fc20152abba6b83724d7ff268c249fa196d8259ff481f3b1476383f8f24e42 \ + --hash=sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe \ + --hash=sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda \ + --hash=sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e \ + --hash=sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737 \ + --hash=sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523 \ + --hash=sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591 \ + --hash=sha256:f71a396b3bf33ecaa1626c255855702aca4d3d9fea5e051b41ac59a9c1c41edc \ + --hash=sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a \ + --hash=sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50 # via # -r requirements.in # jinja2 @@ -801,10 +839,6 @@ pygments==2.19.2 \ --hash=sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887 \ --hash=sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b # via pytest -pypandoc==1.15 \ - --hash=sha256:4ededcc76c8770f27aaca6dff47724578428eca84212a31479403a9731fc2b16 \ - --hash=sha256:ea25beebe712ae41d63f7410c08741a3cab0e420f6703f95bc9b3a749192ce13 - # via -r requirements.in pytest==8.4.2 \ --hash=sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01 \ --hash=sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79 @@ -813,60 +847,80 @@ pytest-asyncio==1.2.0 \ --hash=sha256:8e17ae5e46d8e7efe51ab6494dd2010f4ca8dae51652aa3c8d55acf50bfb2e99 \ --hash=sha256:c609a64a2a8768462d0c99811ddb8bd2583c33fd33cf7f21af1c142e824ffb57 # via -r requirements.in -pyyaml==6.0.2 \ - --hash=sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff \ - --hash=sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48 \ - --hash=sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086 \ - --hash=sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e \ - --hash=sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133 \ - --hash=sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5 \ - --hash=sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484 \ - --hash=sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee \ - --hash=sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5 \ - --hash=sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68 \ - --hash=sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a \ - --hash=sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf \ - --hash=sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99 \ - --hash=sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8 \ - --hash=sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85 \ - --hash=sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19 \ - --hash=sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc \ - --hash=sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a \ - --hash=sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1 \ - --hash=sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317 \ - --hash=sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c \ - --hash=sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631 \ - --hash=sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d \ - --hash=sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652 \ - --hash=sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5 \ - --hash=sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e \ - --hash=sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b \ - --hash=sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8 \ - --hash=sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476 \ - --hash=sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706 \ - --hash=sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563 \ - --hash=sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237 \ - --hash=sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b \ - --hash=sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083 \ - --hash=sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180 \ - --hash=sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425 \ - --hash=sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e \ - --hash=sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f \ - --hash=sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725 \ - --hash=sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183 \ - --hash=sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab \ - --hash=sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774 \ - --hash=sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725 \ - --hash=sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e \ - --hash=sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5 \ - --hash=sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d \ - --hash=sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290 \ - --hash=sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44 \ - --hash=sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed \ - --hash=sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4 \ - --hash=sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba \ - --hash=sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12 \ - --hash=sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4 +pyyaml==6.0.3 \ + --hash=sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c \ + --hash=sha256:0150219816b6a1fa26fb4699fb7daa9caf09eb1999f3b70fb6e786805e80375a \ + --hash=sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3 \ + --hash=sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956 \ + --hash=sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6 \ + --hash=sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c \ + --hash=sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65 \ + --hash=sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a \ + --hash=sha256:1ebe39cb5fc479422b83de611d14e2c0d3bb2a18bbcb01f229ab3cfbd8fee7a0 \ + --hash=sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b \ + --hash=sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1 \ + --hash=sha256:22ba7cfcad58ef3ecddc7ed1db3409af68d023b7f940da23c6c2a1890976eda6 \ + --hash=sha256:27c0abcb4a5dac13684a37f76e701e054692a9b2d3064b70f5e4eb54810553d7 \ + --hash=sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e \ + --hash=sha256:2e71d11abed7344e42a8849600193d15b6def118602c4c176f748e4583246007 \ + --hash=sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310 \ + --hash=sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4 \ + --hash=sha256:3c5677e12444c15717b902a5798264fa7909e41153cdf9ef7ad571b704a63dd9 \ + --hash=sha256:3ff07ec89bae51176c0549bc4c63aa6202991da2d9a6129d7aef7f1407d3f295 \ + --hash=sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea \ + --hash=sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0 \ + --hash=sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e \ + --hash=sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac \ + --hash=sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9 \ + --hash=sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7 \ + --hash=sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35 \ + --hash=sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb \ + --hash=sha256:5cf4e27da7e3fbed4d6c3d8e797387aaad68102272f8f9752883bc32d61cb87b \ + --hash=sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69 \ + --hash=sha256:5ed875a24292240029e4483f9d4a4b8a1ae08843b9c54f43fcc11e404532a8a5 \ + --hash=sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b \ + --hash=sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c \ + --hash=sha256:6344df0d5755a2c9a276d4473ae6b90647e216ab4757f8426893b5dd2ac3f369 \ + --hash=sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd \ + --hash=sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824 \ + --hash=sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198 \ + --hash=sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065 \ + --hash=sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c \ + --hash=sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c \ + --hash=sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764 \ + --hash=sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196 \ + --hash=sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b \ + --hash=sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00 \ + --hash=sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac \ + --hash=sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8 \ + --hash=sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e \ + --hash=sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28 \ + --hash=sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3 \ + --hash=sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5 \ + --hash=sha256:9c57bb8c96f6d1808c030b1687b9b5fb476abaa47f0db9c0101f5e9f394e97f4 \ + --hash=sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b \ + --hash=sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf \ + --hash=sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5 \ + --hash=sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702 \ + --hash=sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8 \ + --hash=sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788 \ + --hash=sha256:b865addae83924361678b652338317d1bd7e79b1f4596f96b96c77a5a34b34da \ + --hash=sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d \ + --hash=sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc \ + --hash=sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c \ + --hash=sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba \ + --hash=sha256:c2514fceb77bc5e7a2f7adfaa1feb2fb311607c9cb518dbc378688ec73d8292f \ + --hash=sha256:c3355370a2c156cffb25e876646f149d5d68f5e0a3ce86a5084dd0b64a994917 \ + --hash=sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5 \ + --hash=sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26 \ + --hash=sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f \ + --hash=sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b \ + --hash=sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be \ + --hash=sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c \ + --hash=sha256:efd7b85f94a6f21e4932043973a7ba2613b059c4a000551892ac9f1d11f5baf3 \ + --hash=sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6 \ + --hash=sha256:fa160448684b4e94d80416c0fa4aac48967a969efe22931448d853ada8baf926 \ + --hash=sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0 # via # -r requirements.in # libcst @@ -918,7 +972,7 @@ typing-extensions==4.15.0 \ # via # aiosignal # exceptiongroup - # libcst + # grpcio # multidict # pytest-asyncio urllib3==2.5.0 \ diff --git a/setup.py b/setup.py index 89bbd29d5a..6f6206d73d 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,6 @@ # https://jinja.palletsprojects.com/en/2.11.x/changelog/#version-2-11-0 "jinja2 >= 2.11", "protobuf>=3.20.2,<7.0.0,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", - "pypandoc >= 1.4", "PyYAML >= 5.1.1", "grpc-google-iam-v1 >= 0.14.0, < 1.0.0", "libcst >= 0.4.9, < 2.0.0", diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py index 38379ce9d7..1612a30704 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py @@ -277,19 +277,20 @@ async def export_assets(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Exports assets with time and resource types to a given Cloud - Storage location/BigQuery table. For Cloud Storage location - destinations, the output format is newline-delimited JSON. Each - line represents a - [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in - the JSON format; for BigQuery table destinations, the output - table stores the fields in asset Protobuf as columns. This API - implements the + r"""Exports assets with time and resource types to a + given Cloud Storage location/BigQuery table. For Cloud + Storage location destinations, the output format is + newline-delimited JSON. Each line represents a + [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] + in the JSON format; for BigQuery table destinations, the + output table stores the fields in asset Protobuf as + columns. This API implements the [google.longrunning.Operation][google.longrunning.Operation] - API, which allows you to keep track of the export. We recommend - intervals of at least 2 seconds with exponential retry to poll - the export operation result. For regular-size resource parent, - the export operation usually finishes within 5 minutes. + API, which allows you to keep track of the export. We + recommend intervals of at least 2 seconds with + exponential retry to poll the export operation result. + For regular-size resource parent, the export operation + usually finishes within 5 minutes. .. code-block:: python @@ -338,13 +339,17 @@ async def sample_export_assets(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.asset_v1.types.ExportAssetsResponse` The export asset response. This message is returned by the - [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] - method in the returned - [google.longrunning.Operation.response][google.longrunning.Operation.response] - field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.asset_v1.types.ExportAssetsResponse` + The export asset response. This message + is returned by the + [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] + method in the returned + [google.longrunning.Operation.response][google.longrunning.Operation.response] + field. """ # Create or coerce a protobuf request object. @@ -429,13 +434,17 @@ async def sample_list_assets(): request (Optional[Union[google.cloud.asset_v1.types.ListAssetsRequest, dict]]): The request object. ListAssets request. parent (:class:`str`): - Required. Name of the organization, folder, or project - the assets belong to. Format: - "organizations/[organization-number]" (such as - "organizations/123"), "projects/[project-id]" (such as - "projects/my-project-id"), "projects/[project-number]" - (such as "projects/12345"), or "folders/[folder-number]" - (such as "folders/12345"). + Required. Name of the organization, + folder, or project the assets belong to. + Format: + "organizations/[organization-number]" + (such as "organizations/123"), + "projects/[project-id]" (such as + "projects/my-project-id"), + "projects/[project-number]" (such as + "projects/12345"), or + "folders/[folder-number]" (such as + "folders/12345"). This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -520,12 +529,13 @@ async def batch_get_assets_history(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> asset_service.BatchGetAssetsHistoryResponse: - r"""Batch gets the update history of assets that overlap a time - window. For IAM_POLICY content, this API outputs history when - the asset and its attached IAM POLICY both exist. This can - create gaps in the output history. Otherwise, this API outputs - history with asset in both non-delete or deleted status. If a - specified asset does not exist, this API returns an + r"""Batch gets the update history of assets that overlap + a time window. For IAM_POLICY content, this API outputs + history when the asset and its attached IAM POLICY both + exist. This can create gaps in the output history. + Otherwise, this API outputs history with asset in both + non-delete or deleted status. + If a specified asset does not exist, this API returns an INVALID_ARGUMENT error. .. code-block:: python @@ -766,8 +776,9 @@ async def sample_get_feed(): request (Optional[Union[google.cloud.asset_v1.types.GetFeedRequest, dict]]): The request object. Get asset feed request. name (:class:`str`): - Required. The name of the Feed and it must be in the - format of: projects/project_number/feeds/feed_id + Required. The name of the Feed and it + must be in the format of: + projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id @@ -990,9 +1001,12 @@ async def sample_update_feed(): request (Optional[Union[google.cloud.asset_v1.types.UpdateFeedRequest, dict]]): The request object. Update asset feed request. feed (:class:`google.cloud.asset_v1.types.Feed`): - Required. The new values of feed details. It must match - an existing feed and the field ``name`` must be in the - format of: projects/project_number/feeds/feed_id or + Required. The new values of feed + details. It must match an existing feed + and the field `name` must be in the + format of: + + projects/project_number/feeds/feed_id or folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id. @@ -1101,8 +1115,9 @@ async def sample_delete_feed(): request (Optional[Union[google.cloud.asset_v1.types.DeleteFeedRequest, dict]]): The request object. name (:class:`str`): - Required. The name of the feed and it must be in the - format of: projects/project_number/feeds/feed_id + Required. The name of the feed and it + must be in the format of: + projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id @@ -1169,10 +1184,11 @@ async def search_all_resources(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.SearchAllResourcesAsyncPager: - r"""Searches all Google Cloud resources within the specified scope, - such as a project, folder, or organization. The caller must be - granted the ``cloudasset.assets.searchAllResources`` permission - on the desired scope, otherwise the request will be rejected. + r"""Searches all Google Cloud resources within the + specified scope, such as a project, folder, or + organization. The caller must be granted the + `cloudasset.assets.searchAllResources` permission on the + desired scope, otherwise the request will be rejected. .. code-block:: python @@ -1205,112 +1221,139 @@ async def sample_search_all_resources(): request (Optional[Union[google.cloud.asset_v1.types.SearchAllResourcesRequest, dict]]): The request object. Search all resources request. scope (:class:`str`): - Required. A scope can be a project, a folder, or an - organization. The search is limited to the resources - within the ``scope``. The caller must be granted the - ```cloudasset.assets.searchAllResources`` `__ + Required. A scope can be a project, a + folder, or an organization. The search + is limited to the resources within the + `scope`. The caller must be granted the + [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) permission on the desired scope. The allowed values are: - - projects/{PROJECT_ID} (e.g., "projects/foo-bar") - - projects/{PROJECT_NUMBER} (e.g., "projects/12345678") - - folders/{FOLDER_NUMBER} (e.g., "folders/1234567") - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * projects/{PROJECT_ID} (e.g., + "projects/foo-bar") * + projects/{PROJECT_NUMBER} (e.g., + "projects/12345678") * + folders/{FOLDER_NUMBER} (e.g., + "folders/1234567") * + organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/123456") This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this should not be set. query (:class:`str`): - Optional. The query statement. See `how to construct a - query `__ - for more information. If not specified or empty, it will - search all the resources within the specified ``scope``. + Optional. The query statement. See + [how to construct a + query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + for more information. If not specified + or empty, it will search all the + resources within the specified `scope`. Examples: - - ``name:Important`` to find Google Cloud resources - whose name contains "Important" as a word. - - ``name=Important`` to find the Google Cloud resource - whose name is exactly "Important". - - ``displayName:Impor*`` to find Google Cloud resources - whose display name contains "Impor" as a prefix of any - word in the field. - - ``location:us-west*`` to find Google Cloud resources - whose location contains both "us" and "west" as - prefixes. - - ``labels:prod`` to find Google Cloud resources whose - labels contain "prod" as a key or value. - - ``labels.env:prod`` to find Google Cloud resources - that have a label "env" and its value is "prod". - - ``labels.env:*`` to find Google Cloud resources that - have a label "env". - - ``kmsKey:key`` to find Google Cloud resources - encrypted with a customer-managed encryption key whose - name contains "key" as a word. This field is - deprecated. Please use the ``kmsKeys`` field to - retrieve Cloud KMS key information. - - ``kmsKeys:key`` to find Google Cloud resources - encrypted with customer-managed encryption keys whose - name contains the word "key". - - ``relationships:instance-group-1`` to find Google - Cloud resources that have relationships with - "instance-group-1" in the related resource name. - - ``relationships:INSTANCE_TO_INSTANCEGROUP`` to find - Compute Engine instances that have relationships of - type "INSTANCE_TO_INSTANCEGROUP". - - ``relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1`` - to find Compute Engine instances that have - relationships with "instance-group-1" in the Compute - Engine instance group resource name, for relationship - type "INSTANCE_TO_INSTANCEGROUP". - - ``state:ACTIVE`` to find Google Cloud resources whose - state contains "ACTIVE" as a word. - - ``NOT state:ACTIVE`` to find Google Cloud resources - whose state doesn't contain "ACTIVE" as a word. - - ``createTime<1609459200`` to find Google Cloud - resources that were created before "2021-01-01 - 00:00:00 UTC". 1609459200 is the epoch timestamp of - "2021-01-01 00:00:00 UTC" in seconds. - - ``updateTime>1609459200`` to find Google Cloud - resources that were updated after "2021-01-01 00:00:00 - UTC". 1609459200 is the epoch timestamp of "2021-01-01 - 00:00:00 UTC" in seconds. - - ``Important`` to find Google Cloud resources that - contain "Important" as a word in any of the searchable - fields. - - ``Impor*`` to find Google Cloud resources that contain - "Impor" as a prefix of any word in any of the - searchable fields. - - ``Important location:(us-west1 OR global)`` to find - Google Cloud resources that contain "Important" as a - word in any of the searchable fields and are also - located in the "us-west1" region or the "global" - location. + * `name:Important` to find Google Cloud + resources whose name contains + "Important" as a word. + * `name=Important` to find the Google + Cloud resource whose name is exactly + "Important". + * `displayName:Impor*` to find Google + Cloud resources whose display name + contains "Impor" as a prefix of any word + in the field. * `location:us-west*` to + find Google Cloud resources whose + location contains both "us" and "west" + as prefixes. * `labels:prod` to find + Google Cloud resources whose labels + contain "prod" as a key or value. + * `labels.env:prod` to find Google Cloud + resources that have a label "env" and + its value is "prod". + * `labels.env:*` to find Google Cloud + resources that have a label "env". * + `kmsKey:key` to find Google Cloud + resources encrypted with a + customer-managed encryption key whose + name contains "key" as a word. This + field is deprecated. Please use the + `kmsKeys` field to retrieve Cloud KMS + key information. + * `kmsKeys:key` to find Google Cloud + resources encrypted with + customer-managed encryption keys whose + name contains the word "key". * + `relationships:instance-group-1` to find + Google Cloud resources that have + relationships with "instance-group-1" in + the related resource name. * + `relationships:INSTANCE_TO_INSTANCEGROUP` + to find Compute Engine instances that + have relationships of type + "INSTANCE_TO_INSTANCEGROUP". * + `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` + to find Compute Engine instances that + have relationships with + "instance-group-1" in the Compute + Engine instance group resource name, for + relationship type + "INSTANCE_TO_INSTANCEGROUP". + * `state:ACTIVE` to find Google Cloud + resources whose state contains + "ACTIVE" as a word. + * `NOT state:ACTIVE` to find Google + Cloud resources whose state doesn't + contain "ACTIVE" as a word. + * `createTime<1609459200` to find Google + Cloud resources that were created + before "2021-01-01 00:00:00 UTC". + 1609459200 is the epoch timestamp of + "2021-01-01 00:00:00 UTC" in seconds. + * `updateTime>1609459200` to find Google + Cloud resources that were updated + after "2021-01-01 00:00:00 UTC". + 1609459200 is the epoch timestamp of + "2021-01-01 00:00:00 UTC" in seconds. + * `Important` to find Google Cloud + resources that contain "Important" as a + word in any of the searchable fields. + * `Impor*` to find Google Cloud + resources that contain "Impor" as a + prefix of any word in any of the + searchable fields. * `Important + location:(us-west1 OR global)` to find + Google Cloud resources that contain + "Important" as a word in any of the + searchable fields and are also located + in the "us-west1" region or the "global" + location. This corresponds to the ``query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. asset_types (:class:`MutableSequence[str]`): - Optional. A list of asset types that this request - searches for. If empty, it will search all the - `searchable asset - types `__. - - Regular expressions are also supported. For example: - - - "compute.googleapis.com.\*" snapshots resources whose - asset type starts with "compute.googleapis.com". - - ".*Instance" snapshots resources whose asset type ends - with "Instance". - - ".\ *Instance.*" snapshots resources whose asset type - contains "Instance". - - See `RE2 `__ - for all supported regular expression syntax. If the - regular expression does not match any supported asset - type, an INVALID_ARGUMENT error will be returned. + Optional. A list of asset types that + this request searches for. If empty, it + will search all the [searchable asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + + Regular expressions are also supported. + For example: + + * "compute.googleapis.com.*" snapshots + resources whose asset type starts with + "compute.googleapis.com". + * ".*Instance" snapshots resources whose + asset type ends with "Instance". * + ".*Instance.*" snapshots resources whose + asset type contains "Instance". + + See + [RE2](https://github.com/google/re2/wiki/Syntax) + for all supported regular expression + syntax. If the regular expression does + not match any supported asset type, an + INVALID_ARGUMENT error will be returned. This corresponds to the ``asset_types`` field on the ``request`` instance; if ``request`` is provided, this @@ -1401,10 +1444,12 @@ async def search_all_iam_policies(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.SearchAllIamPoliciesAsyncPager: - r"""Searches all IAM policies within the specified scope, such as a - project, folder, or organization. The caller must be granted the - ``cloudasset.assets.searchAllIamPolicies`` permission on the - desired scope, otherwise the request will be rejected. + r"""Searches all IAM policies within the specified scope, + such as a project, folder, or organization. The caller + must be granted the + `cloudasset.assets.searchAllIamPolicies` permission on + the desired scope, otherwise the request will be + rejected. .. code-block:: python @@ -1437,74 +1482,97 @@ async def sample_search_all_iam_policies(): request (Optional[Union[google.cloud.asset_v1.types.SearchAllIamPoliciesRequest, dict]]): The request object. Search all IAM policies request. scope (:class:`str`): - Required. A scope can be a project, a folder, or an - organization. The search is limited to the IAM policies - within the ``scope``. The caller must be granted the - ```cloudasset.assets.searchAllIamPolicies`` `__ + Required. A scope can be a project, a + folder, or an organization. The search + is limited to the IAM policies within + the `scope`. The caller must be granted + the + [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) permission on the desired scope. The allowed values are: - - projects/{PROJECT_ID} (e.g., "projects/foo-bar") - - projects/{PROJECT_NUMBER} (e.g., "projects/12345678") - - folders/{FOLDER_NUMBER} (e.g., "folders/1234567") - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * projects/{PROJECT_ID} (e.g., + "projects/foo-bar") * + projects/{PROJECT_NUMBER} (e.g., + "projects/12345678") * + folders/{FOLDER_NUMBER} (e.g., + "folders/1234567") * + organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/123456") This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this should not be set. query (:class:`str`): - Optional. The query statement. See `how to construct a - query `__ - for more information. If not specified or empty, it will - search all the IAM policies within the specified - ``scope``. Note that the query string is compared - against each IAM policy binding, including its - principals, roles, and IAM conditions. The returned IAM - policies will only contain the bindings that match your - query. To learn more about the IAM policy structure, see - the `IAM policy - documentation `__. + Optional. The query statement. See + [how to construct a + query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) + for more information. If not specified + or empty, it will search all the IAM + policies within the specified `scope`. + Note that the query string is compared + against each IAM policy binding, + including its principals, roles, and IAM + conditions. The returned IAM policies + will only contain the bindings that + match your query. To learn more about + the IAM policy structure, see the [IAM + policy + documentation](https://cloud.google.com/iam/help/allow-policies/structure). Examples: - - ``policy:amy@gmail.com`` to find IAM policy bindings - that specify user "amy@gmail.com". - - ``policy:roles/compute.admin`` to find IAM policy - bindings that specify the Compute Admin role. - - ``policy:comp*`` to find IAM policy bindings that - contain "comp" as a prefix of any word in the binding. - - ``policy.role.permissions:storage.buckets.update`` to - find IAM policy bindings that specify a role - containing "storage.buckets.update" permission. Note - that if callers don't have ``iam.roles.get`` access to - a role's included permissions, policy bindings that - specify this role will be dropped from the search - results. - - ``policy.role.permissions:upd*`` to find IAM policy - bindings that specify a role containing "upd" as a - prefix of any word in the role permission. Note that - if callers don't have ``iam.roles.get`` access to a - role's included permissions, policy bindings that - specify this role will be dropped from the search - results. - - ``resource:organizations/123456`` to find IAM policy - bindings that are set on "organizations/123456". - - ``resource=//cloudresourcemanager.googleapis.com/projects/myproject`` - to find IAM policy bindings that are set on the - project named "myproject". - - ``Important`` to find IAM policy bindings that contain - "Important" as a word in any of the searchable fields - (except for the included permissions). - - ``resource:(instance1 OR instance2) policy:amy`` to - find IAM policy bindings that are set on resources - "instance1" or "instance2" and also specify user - "amy". - - ``roles:roles/compute.admin`` to find IAM policy - bindings that specify the Compute Admin role. - - ``memberTypes:user`` to find IAM policy bindings that - contain the principal type "user". + * `policy:amy@gmail.com` to find IAM + policy bindings that specify user + "amy@gmail.com". + * `policy:roles/compute.admin` to find + IAM policy bindings that specify the + Compute Admin role. + * `policy:comp*` to find IAM policy + bindings that contain "comp" as a + prefix of any word in the binding. + * + `policy.role.permissions:storage.buckets.update` + to find IAM policy bindings that + specify a role containing + "storage.buckets.update" permission. + Note that if callers don't have + `iam.roles.get` access to a role's + included permissions, policy bindings + that specify this role will be dropped + from the search results. + * `policy.role.permissions:upd*` to find + IAM policy bindings that specify a + role containing "upd" as a prefix of any + word in the role permission. Note that + if callers don't have `iam.roles.get` + access to a role's included + permissions, policy bindings that + specify this role will be dropped from + the search results. + * `resource:organizations/123456` to + find IAM policy bindings that are set + on "organizations/123456". + * + `resource=//cloudresourcemanager.googleapis.com/projects/myproject` + to find IAM policy bindings that are + set on the project named "myproject". * + `Important` to find IAM policy bindings + that contain "Important" as a word in + any of the searchable fields (except for + the included permissions). + * `resource:(instance1 OR instance2) + policy:amy` to find IAM policy + bindings that are set on resources + "instance1" or "instance2" and also + specify user "amy". * + `roles:roles/compute.admin` to find IAM + policy bindings that specify the + Compute Admin role. + * `memberTypes:user` to find IAM policy + bindings that contain the principal + type "user". This corresponds to the ``query`` field on the ``request`` instance; if ``request`` is provided, this @@ -1638,7 +1706,7 @@ async def sample_analyze_iam_policy(): Returns: google.cloud.asset_v1.types.AnalyzeIamPolicyResponse: A response message for - [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. + [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. """ # Create or coerce a protobuf request object. @@ -1680,18 +1748,19 @@ async def analyze_iam_policy_longrunning(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Analyzes IAM policies asynchronously to answer which identities - have what accesses on which resources, and writes the analysis - results to a Google Cloud Storage or a BigQuery destination. For - Cloud Storage destination, the output format is the JSON format - that represents a + r"""Analyzes IAM policies asynchronously to answer which + identities have what accesses on which resources, and + writes the analysis results to a Google Cloud Storage or + a BigQuery destination. For Cloud Storage destination, + the output format is the JSON format that represents a [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the [google.longrunning.Operation][google.longrunning.Operation], - which allows you to track the operation status. We recommend - intervals of at least 2 seconds with exponential backoff retry - to poll the operation result. The metadata contains the metadata - for the long-running operation. + which allows you to track the operation status. We + recommend intervals of at least 2 seconds with + exponential backoff retry to poll the operation result. + The metadata contains the metadata for the long-running + operation. .. code-block:: python @@ -1744,10 +1813,13 @@ async def sample_analyze_iam_policy_longrunning(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse` A response message for - [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse` + A response message for + [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]. """ # Create or coerce a protobuf request object. @@ -1889,20 +1961,20 @@ async def query_assets(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> asset_service.QueryAssetsResponse: - r"""Issue a job that queries assets using a SQL statement compatible - with `BigQuery Standard - SQL `__. + r"""Issue a job that queries assets using a SQL statement + compatible with [BigQuery Standard + SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). - If the query execution finishes within timeout and there's no - pagination, the full query results will be returned in the - ``QueryAssetsResponse``. + If the query execution finishes within timeout and + there's no pagination, the full query results will be + returned in the `QueryAssetsResponse`. - Otherwise, full query results can be obtained by issuing extra - requests with the ``job_reference`` from the a previous - ``QueryAssets`` call. + Otherwise, full query results can be obtained by issuing + extra requests with the `job_reference` from the a + previous `QueryAssets` call. - Note, the query result has approximately 10 GB limitation - enforced by BigQuery + Note, the query result has approximately 10 GB + limitation enforced by BigQuery https://cloud.google.com/bigquery/docs/best-practices-performance-output, queries return larger results will result in errors. @@ -2024,35 +2096,42 @@ async def sample_create_saved_query(): request (Optional[Union[google.cloud.asset_v1.types.CreateSavedQueryRequest, dict]]): The request object. Request to create a saved query. parent (:class:`str`): - Required. The name of the project/folder/organization - where this saved_query should be created in. It can only - be an organization number (such as "organizations/123"), - a folder number (such as "folders/123"), a project ID - (such as "projects/my-project-id"), or a project number - (such as "projects/12345"). + Required. The name of the + project/folder/organization where this + saved_query should be created in. It can + only be an organization number (such as + "organizations/123"), a folder number + (such as "folders/123"), a project ID + (such as "projects/my-project-id"), or a + project number (such as + "projects/12345"). This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. saved_query (:class:`google.cloud.asset_v1.types.SavedQuery`): - Required. The saved_query details. The ``name`` field - must be empty as it will be generated based on the - parent and saved_query_id. + Required. The saved_query details. + The `name` field must be empty as it + will be generated based on the parent + and saved_query_id. This corresponds to the ``saved_query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. saved_query_id (:class:`str`): - Required. The ID to use for the saved query, which must - be unique in the specified parent. It will become the - final component of the saved query's resource name. + Required. The ID to use for the saved + query, which must be unique in the + specified parent. It will become the + final component of the saved query's + resource name. - This value should be 4-63 characters, and valid - characters are ``[a-z][0-9]-``. + This value should be 4-63 characters, + and valid characters are `[a-z][0-9]-`. - Notice that this field is required in the saved query - creation, and the ``name`` field of the ``saved_query`` - will be ignored. + Notice that this field is required in + the saved query creation, and the `name` + field of the `saved_query` will be + ignored. This corresponds to the ``saved_query_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -2160,12 +2239,14 @@ async def sample_get_saved_query(): request (Optional[Union[google.cloud.asset_v1.types.GetSavedQueryRequest, dict]]): The request object. Request to get a saved query. name (:class:`str`): - Required. The name of the saved query and it must be in - the format of: - - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id + Required. The name of the saved query + and it must be in the format of: + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -2397,12 +2478,16 @@ async def sample_update_saved_query(): saved_query (:class:`google.cloud.asset_v1.types.SavedQuery`): Required. The saved query to update. - The saved query's ``name`` field is used to identify the - one to update, which has format as below: + The saved query's `name` field is used + to identify the one to update, which has + format as below: - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id This corresponds to the ``saved_query`` field on the ``request`` instance; if ``request`` is provided, this @@ -2512,12 +2597,15 @@ async def sample_delete_saved_query(): request (Optional[Union[google.cloud.asset_v1.types.DeleteSavedQueryRequest, dict]]): The request object. Request to delete a saved query. name (:class:`str`): - Required. The name of the saved query to delete. It must - be in the format of: + Required. The name of the saved query + to delete. It must be in the format of: - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -2623,7 +2711,7 @@ async def sample_batch_get_effective_iam_policies(): Returns: google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesResponse: A response message for - [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies]. + [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies]. """ # Create or coerce a protobuf request object. @@ -2703,11 +2791,12 @@ async def sample_analyze_org_policies(): The request object. A request message for [AssetService.AnalyzeOrgPolicies][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicies]. scope (:class:`str`): - Required. The organization to scope the request. Only - organization policies within the scope will be analyzed. + Required. The organization to scope + the request. Only organization policies + within the scope will be analyzed. - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/123456") This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this @@ -2726,12 +2815,14 @@ async def sample_analyze_org_policies(): The expression to filter [AnalyzeOrgPoliciesResponse.org_policy_results][google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.org_policy_results]. The only supported field is - ``consolidated_policy.attached_resource``, and the only - supported operator is ``=``. + `consolidated_policy.attached_resource`, + and the only supported operator is `=`. Example: + consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001" - will return the org policy results of"folders/001". + will return the org policy results + of"folders/001". This corresponds to the ``filter`` field on the ``request`` instance; if ``request`` is provided, this @@ -2747,10 +2838,11 @@ async def sample_analyze_org_policies(): Returns: google.cloud.asset_v1.services.asset_service.pagers.AnalyzeOrgPoliciesAsyncPager: The response message for - [AssetService.AnalyzeOrgPolicies][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicies]. + [AssetService.AnalyzeOrgPolicies][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicies]. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -2859,13 +2951,15 @@ async def sample_analyze_org_policy_governed_containers(): The request object. A request message for [AssetService.AnalyzeOrgPolicyGovernedContainers][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedContainers]. scope (:class:`str`): - Required. The organization to scope the request. Only - organization policies within the scope will be analyzed. - The output containers will also be limited to the ones - governed by those in-scope organization policies. + Required. The organization to scope + the request. Only organization policies + within the scope will be analyzed. The + output containers will also be limited + to the ones governed by those in-scope + organization policies. - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/123456") This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this @@ -2880,13 +2974,16 @@ async def sample_analyze_org_policy_governed_containers(): on the ``request`` instance; if ``request`` is provided, this should not be set. filter (:class:`str`): - The expression to filter the governed containers in - result. The only supported field is ``parent``, and the - only supported operator is ``=``. + The expression to filter the governed + containers in result. The only supported + field is `parent`, and the only + supported operator is `=`. Example: + parent="//cloudresourcemanager.googleapis.com/folders/001" - will return all containers under "folders/001". + will return all containers under + "folders/001". This corresponds to the ``filter`` field on the ``request`` instance; if ``request`` is provided, this @@ -2902,10 +2999,11 @@ async def sample_analyze_org_policy_governed_containers(): Returns: google.cloud.asset_v1.services.asset_service.pagers.AnalyzeOrgPolicyGovernedContainersAsyncPager: The response message for - [AssetService.AnalyzeOrgPolicyGovernedContainers][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedContainers]. + [AssetService.AnalyzeOrgPolicyGovernedContainers][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedContainers]. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -2978,24 +3076,25 @@ async def analyze_org_policy_governed_assets(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AnalyzeOrgPolicyGovernedAssetsAsyncPager: - r"""Analyzes organization policies governed assets (Google Cloud - resources or policies) under a scope. This RPC supports custom - constraints and the following 10 canned constraints: - - - storage.uniformBucketLevelAccess - - iam.disableServiceAccountKeyCreation - - iam.allowedPolicyMemberDomains - - compute.vmExternalIpAccess - - appengine.enforceServiceAccountActAsCheck - - gcp.resourceLocations - - compute.trustedImageProjects - - compute.skipDefaultNetworkCreation - - compute.requireOsLogin - - compute.disableNestedVirtualization - - This RPC only returns either resources of types supported by - `searchable asset - types `__, + r"""Analyzes organization policies governed assets + (Google Cloud resources or policies) under a scope. This + RPC supports custom constraints and the following 10 + canned constraints: + + * storage.uniformBucketLevelAccess + * iam.disableServiceAccountKeyCreation + * iam.allowedPolicyMemberDomains + * compute.vmExternalIpAccess + * appengine.enforceServiceAccountActAsCheck + * gcp.resourceLocations + * compute.trustedImageProjects + * compute.skipDefaultNetworkCreation + * compute.requireOsLogin + * compute.disableNestedVirtualization + + This RPC only returns either resources of types + supported by [searchable asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types), or IAM policies. .. code-block:: python @@ -3031,13 +3130,15 @@ async def sample_analyze_org_policy_governed_assets(): The request object. A request message for [AssetService.AnalyzeOrgPolicyGovernedAssets][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedAssets]. scope (:class:`str`): - Required. The organization to scope the request. Only - organization policies within the scope will be analyzed. - The output assets will also be limited to the ones - governed by those in-scope organization policies. + Required. The organization to scope + the request. Only organization policies + within the scope will be analyzed. The + output assets will also be limited to + the ones governed by those in-scope + organization policies. - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/123456") This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this @@ -3053,24 +3154,29 @@ async def sample_analyze_org_policy_governed_assets(): on the ``request`` instance; if ``request`` is provided, this should not be set. filter (:class:`str`): - The expression to filter the governed assets in result. - The only supported fields for governed resources are - ``governed_resource.project`` and - ``governed_resource.folders``. The only supported fields - for governed iam policies are - ``governed_iam_policy.project`` and - ``governed_iam_policy.folders``. The only supported - operator is ``=``. - - Example 1: governed_resource.project="projects/12345678" - filter will return all governed resources under - projects/12345678 including the project ifself, if + The expression to filter the governed + assets in result. The only supported + fields for governed resources are + `governed_resource.project` and + `governed_resource.folders`. The only + supported fields for governed iam + policies are + `governed_iam_policy.project` and + `governed_iam_policy.folders`. The only + supported operator is `=`. + + Example 1: + governed_resource.project="projects/12345678" + filter will return all governed + resources under projects/12345678 + including the project ifself, if applicable. Example 2: - governed_iam_policy.folders="folders/12345678" filter - will return all governed iam policies under - folders/12345678, if applicable. + governed_iam_policy.folders="folders/12345678" + filter will return all governed iam + policies under folders/12345678, if + applicable. This corresponds to the ``filter`` field on the ``request`` instance; if ``request`` is provided, this @@ -3086,10 +3192,11 @@ async def sample_analyze_org_policy_governed_assets(): Returns: google.cloud.asset_v1.services.asset_service.pagers.AnalyzeOrgPolicyGovernedAssetsAsyncPager: The response message for - [AssetService.AnalyzeOrgPolicyGovernedAssets][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedAssets]. + [AssetService.AnalyzeOrgPolicyGovernedAssets][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedAssets]. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py index 76df912ab0..c5f99f9c49 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py @@ -680,19 +680,20 @@ def export_assets(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Exports assets with time and resource types to a given Cloud - Storage location/BigQuery table. For Cloud Storage location - destinations, the output format is newline-delimited JSON. Each - line represents a - [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in - the JSON format; for BigQuery table destinations, the output - table stores the fields in asset Protobuf as columns. This API - implements the + r"""Exports assets with time and resource types to a + given Cloud Storage location/BigQuery table. For Cloud + Storage location destinations, the output format is + newline-delimited JSON. Each line represents a + [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] + in the JSON format; for BigQuery table destinations, the + output table stores the fields in asset Protobuf as + columns. This API implements the [google.longrunning.Operation][google.longrunning.Operation] - API, which allows you to keep track of the export. We recommend - intervals of at least 2 seconds with exponential retry to poll - the export operation result. For regular-size resource parent, - the export operation usually finishes within 5 minutes. + API, which allows you to keep track of the export. We + recommend intervals of at least 2 seconds with + exponential retry to poll the export operation result. + For regular-size resource parent, the export operation + usually finishes within 5 minutes. .. code-block:: python @@ -741,13 +742,17 @@ def sample_export_assets(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.asset_v1.types.ExportAssetsResponse` The export asset response. This message is returned by the - [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] - method in the returned - [google.longrunning.Operation.response][google.longrunning.Operation.response] - field. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.asset_v1.types.ExportAssetsResponse` + The export asset response. This message + is returned by the + [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] + method in the returned + [google.longrunning.Operation.response][google.longrunning.Operation.response] + field. """ # Create or coerce a protobuf request object. @@ -832,13 +837,17 @@ def sample_list_assets(): request (Union[google.cloud.asset_v1.types.ListAssetsRequest, dict]): The request object. ListAssets request. parent (str): - Required. Name of the organization, folder, or project - the assets belong to. Format: - "organizations/[organization-number]" (such as - "organizations/123"), "projects/[project-id]" (such as - "projects/my-project-id"), "projects/[project-number]" - (such as "projects/12345"), or "folders/[folder-number]" - (such as "folders/12345"). + Required. Name of the organization, + folder, or project the assets belong to. + Format: + "organizations/[organization-number]" + (such as "organizations/123"), + "projects/[project-id]" (such as + "projects/my-project-id"), + "projects/[project-number]" (such as + "projects/12345"), or + "folders/[folder-number]" (such as + "folders/12345"). This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -922,12 +931,13 @@ def batch_get_assets_history(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> asset_service.BatchGetAssetsHistoryResponse: - r"""Batch gets the update history of assets that overlap a time - window. For IAM_POLICY content, this API outputs history when - the asset and its attached IAM POLICY both exist. This can - create gaps in the output history. Otherwise, this API outputs - history with asset in both non-delete or deleted status. If a - specified asset does not exist, this API returns an + r"""Batch gets the update history of assets that overlap + a time window. For IAM_POLICY content, this API outputs + history when the asset and its attached IAM POLICY both + exist. This can create gaps in the output history. + Otherwise, this API outputs history with asset in both + non-delete or deleted status. + If a specified asset does not exist, this API returns an INVALID_ARGUMENT error. .. code-block:: python @@ -1167,8 +1177,9 @@ def sample_get_feed(): request (Union[google.cloud.asset_v1.types.GetFeedRequest, dict]): The request object. Get asset feed request. name (str): - Required. The name of the Feed and it must be in the - format of: projects/project_number/feeds/feed_id + Required. The name of the Feed and it + must be in the format of: + projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id @@ -1389,9 +1400,12 @@ def sample_update_feed(): request (Union[google.cloud.asset_v1.types.UpdateFeedRequest, dict]): The request object. Update asset feed request. feed (google.cloud.asset_v1.types.Feed): - Required. The new values of feed details. It must match - an existing feed and the field ``name`` must be in the - format of: projects/project_number/feeds/feed_id or + Required. The new values of feed + details. It must match an existing feed + and the field `name` must be in the + format of: + + projects/project_number/feeds/feed_id or folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id. @@ -1499,8 +1513,9 @@ def sample_delete_feed(): request (Union[google.cloud.asset_v1.types.DeleteFeedRequest, dict]): The request object. name (str): - Required. The name of the feed and it must be in the - format of: projects/project_number/feeds/feed_id + Required. The name of the feed and it + must be in the format of: + projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id @@ -1566,10 +1581,11 @@ def search_all_resources(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.SearchAllResourcesPager: - r"""Searches all Google Cloud resources within the specified scope, - such as a project, folder, or organization. The caller must be - granted the ``cloudasset.assets.searchAllResources`` permission - on the desired scope, otherwise the request will be rejected. + r"""Searches all Google Cloud resources within the + specified scope, such as a project, folder, or + organization. The caller must be granted the + `cloudasset.assets.searchAllResources` permission on the + desired scope, otherwise the request will be rejected. .. code-block:: python @@ -1602,112 +1618,139 @@ def sample_search_all_resources(): request (Union[google.cloud.asset_v1.types.SearchAllResourcesRequest, dict]): The request object. Search all resources request. scope (str): - Required. A scope can be a project, a folder, or an - organization. The search is limited to the resources - within the ``scope``. The caller must be granted the - ```cloudasset.assets.searchAllResources`` `__ + Required. A scope can be a project, a + folder, or an organization. The search + is limited to the resources within the + `scope`. The caller must be granted the + [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) permission on the desired scope. The allowed values are: - - projects/{PROJECT_ID} (e.g., "projects/foo-bar") - - projects/{PROJECT_NUMBER} (e.g., "projects/12345678") - - folders/{FOLDER_NUMBER} (e.g., "folders/1234567") - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * projects/{PROJECT_ID} (e.g., + "projects/foo-bar") * + projects/{PROJECT_NUMBER} (e.g., + "projects/12345678") * + folders/{FOLDER_NUMBER} (e.g., + "folders/1234567") * + organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/123456") This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this should not be set. query (str): - Optional. The query statement. See `how to construct a - query `__ - for more information. If not specified or empty, it will - search all the resources within the specified ``scope``. + Optional. The query statement. See + [how to construct a + query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + for more information. If not specified + or empty, it will search all the + resources within the specified `scope`. Examples: - - ``name:Important`` to find Google Cloud resources - whose name contains "Important" as a word. - - ``name=Important`` to find the Google Cloud resource - whose name is exactly "Important". - - ``displayName:Impor*`` to find Google Cloud resources - whose display name contains "Impor" as a prefix of any - word in the field. - - ``location:us-west*`` to find Google Cloud resources - whose location contains both "us" and "west" as - prefixes. - - ``labels:prod`` to find Google Cloud resources whose - labels contain "prod" as a key or value. - - ``labels.env:prod`` to find Google Cloud resources - that have a label "env" and its value is "prod". - - ``labels.env:*`` to find Google Cloud resources that - have a label "env". - - ``kmsKey:key`` to find Google Cloud resources - encrypted with a customer-managed encryption key whose - name contains "key" as a word. This field is - deprecated. Please use the ``kmsKeys`` field to - retrieve Cloud KMS key information. - - ``kmsKeys:key`` to find Google Cloud resources - encrypted with customer-managed encryption keys whose - name contains the word "key". - - ``relationships:instance-group-1`` to find Google - Cloud resources that have relationships with - "instance-group-1" in the related resource name. - - ``relationships:INSTANCE_TO_INSTANCEGROUP`` to find - Compute Engine instances that have relationships of - type "INSTANCE_TO_INSTANCEGROUP". - - ``relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1`` - to find Compute Engine instances that have - relationships with "instance-group-1" in the Compute - Engine instance group resource name, for relationship - type "INSTANCE_TO_INSTANCEGROUP". - - ``state:ACTIVE`` to find Google Cloud resources whose - state contains "ACTIVE" as a word. - - ``NOT state:ACTIVE`` to find Google Cloud resources - whose state doesn't contain "ACTIVE" as a word. - - ``createTime<1609459200`` to find Google Cloud - resources that were created before "2021-01-01 - 00:00:00 UTC". 1609459200 is the epoch timestamp of - "2021-01-01 00:00:00 UTC" in seconds. - - ``updateTime>1609459200`` to find Google Cloud - resources that were updated after "2021-01-01 00:00:00 - UTC". 1609459200 is the epoch timestamp of "2021-01-01 - 00:00:00 UTC" in seconds. - - ``Important`` to find Google Cloud resources that - contain "Important" as a word in any of the searchable - fields. - - ``Impor*`` to find Google Cloud resources that contain - "Impor" as a prefix of any word in any of the - searchable fields. - - ``Important location:(us-west1 OR global)`` to find - Google Cloud resources that contain "Important" as a - word in any of the searchable fields and are also - located in the "us-west1" region or the "global" - location. + * `name:Important` to find Google Cloud + resources whose name contains + "Important" as a word. + * `name=Important` to find the Google + Cloud resource whose name is exactly + "Important". + * `displayName:Impor*` to find Google + Cloud resources whose display name + contains "Impor" as a prefix of any word + in the field. * `location:us-west*` to + find Google Cloud resources whose + location contains both "us" and "west" + as prefixes. * `labels:prod` to find + Google Cloud resources whose labels + contain "prod" as a key or value. + * `labels.env:prod` to find Google Cloud + resources that have a label "env" and + its value is "prod". + * `labels.env:*` to find Google Cloud + resources that have a label "env". * + `kmsKey:key` to find Google Cloud + resources encrypted with a + customer-managed encryption key whose + name contains "key" as a word. This + field is deprecated. Please use the + `kmsKeys` field to retrieve Cloud KMS + key information. + * `kmsKeys:key` to find Google Cloud + resources encrypted with + customer-managed encryption keys whose + name contains the word "key". * + `relationships:instance-group-1` to find + Google Cloud resources that have + relationships with "instance-group-1" in + the related resource name. * + `relationships:INSTANCE_TO_INSTANCEGROUP` + to find Compute Engine instances that + have relationships of type + "INSTANCE_TO_INSTANCEGROUP". * + `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` + to find Compute Engine instances that + have relationships with + "instance-group-1" in the Compute + Engine instance group resource name, for + relationship type + "INSTANCE_TO_INSTANCEGROUP". + * `state:ACTIVE` to find Google Cloud + resources whose state contains + "ACTIVE" as a word. + * `NOT state:ACTIVE` to find Google + Cloud resources whose state doesn't + contain "ACTIVE" as a word. + * `createTime<1609459200` to find Google + Cloud resources that were created + before "2021-01-01 00:00:00 UTC". + 1609459200 is the epoch timestamp of + "2021-01-01 00:00:00 UTC" in seconds. + * `updateTime>1609459200` to find Google + Cloud resources that were updated + after "2021-01-01 00:00:00 UTC". + 1609459200 is the epoch timestamp of + "2021-01-01 00:00:00 UTC" in seconds. + * `Important` to find Google Cloud + resources that contain "Important" as a + word in any of the searchable fields. + * `Impor*` to find Google Cloud + resources that contain "Impor" as a + prefix of any word in any of the + searchable fields. * `Important + location:(us-west1 OR global)` to find + Google Cloud resources that contain + "Important" as a word in any of the + searchable fields and are also located + in the "us-west1" region or the "global" + location. This corresponds to the ``query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. asset_types (MutableSequence[str]): - Optional. A list of asset types that this request - searches for. If empty, it will search all the - `searchable asset - types `__. - - Regular expressions are also supported. For example: - - - "compute.googleapis.com.\*" snapshots resources whose - asset type starts with "compute.googleapis.com". - - ".*Instance" snapshots resources whose asset type ends - with "Instance". - - ".\ *Instance.*" snapshots resources whose asset type - contains "Instance". - - See `RE2 `__ - for all supported regular expression syntax. If the - regular expression does not match any supported asset - type, an INVALID_ARGUMENT error will be returned. + Optional. A list of asset types that + this request searches for. If empty, it + will search all the [searchable asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + + Regular expressions are also supported. + For example: + + * "compute.googleapis.com.*" snapshots + resources whose asset type starts with + "compute.googleapis.com". + * ".*Instance" snapshots resources whose + asset type ends with "Instance". * + ".*Instance.*" snapshots resources whose + asset type contains "Instance". + + See + [RE2](https://github.com/google/re2/wiki/Syntax) + for all supported regular expression + syntax. If the regular expression does + not match any supported asset type, an + INVALID_ARGUMENT error will be returned. This corresponds to the ``asset_types`` field on the ``request`` instance; if ``request`` is provided, this @@ -1797,10 +1840,12 @@ def search_all_iam_policies(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.SearchAllIamPoliciesPager: - r"""Searches all IAM policies within the specified scope, such as a - project, folder, or organization. The caller must be granted the - ``cloudasset.assets.searchAllIamPolicies`` permission on the - desired scope, otherwise the request will be rejected. + r"""Searches all IAM policies within the specified scope, + such as a project, folder, or organization. The caller + must be granted the + `cloudasset.assets.searchAllIamPolicies` permission on + the desired scope, otherwise the request will be + rejected. .. code-block:: python @@ -1833,74 +1878,97 @@ def sample_search_all_iam_policies(): request (Union[google.cloud.asset_v1.types.SearchAllIamPoliciesRequest, dict]): The request object. Search all IAM policies request. scope (str): - Required. A scope can be a project, a folder, or an - organization. The search is limited to the IAM policies - within the ``scope``. The caller must be granted the - ```cloudasset.assets.searchAllIamPolicies`` `__ + Required. A scope can be a project, a + folder, or an organization. The search + is limited to the IAM policies within + the `scope`. The caller must be granted + the + [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) permission on the desired scope. The allowed values are: - - projects/{PROJECT_ID} (e.g., "projects/foo-bar") - - projects/{PROJECT_NUMBER} (e.g., "projects/12345678") - - folders/{FOLDER_NUMBER} (e.g., "folders/1234567") - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * projects/{PROJECT_ID} (e.g., + "projects/foo-bar") * + projects/{PROJECT_NUMBER} (e.g., + "projects/12345678") * + folders/{FOLDER_NUMBER} (e.g., + "folders/1234567") * + organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/123456") This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this should not be set. query (str): - Optional. The query statement. See `how to construct a - query `__ - for more information. If not specified or empty, it will - search all the IAM policies within the specified - ``scope``. Note that the query string is compared - against each IAM policy binding, including its - principals, roles, and IAM conditions. The returned IAM - policies will only contain the bindings that match your - query. To learn more about the IAM policy structure, see - the `IAM policy - documentation `__. + Optional. The query statement. See + [how to construct a + query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) + for more information. If not specified + or empty, it will search all the IAM + policies within the specified `scope`. + Note that the query string is compared + against each IAM policy binding, + including its principals, roles, and IAM + conditions. The returned IAM policies + will only contain the bindings that + match your query. To learn more about + the IAM policy structure, see the [IAM + policy + documentation](https://cloud.google.com/iam/help/allow-policies/structure). Examples: - - ``policy:amy@gmail.com`` to find IAM policy bindings - that specify user "amy@gmail.com". - - ``policy:roles/compute.admin`` to find IAM policy - bindings that specify the Compute Admin role. - - ``policy:comp*`` to find IAM policy bindings that - contain "comp" as a prefix of any word in the binding. - - ``policy.role.permissions:storage.buckets.update`` to - find IAM policy bindings that specify a role - containing "storage.buckets.update" permission. Note - that if callers don't have ``iam.roles.get`` access to - a role's included permissions, policy bindings that - specify this role will be dropped from the search - results. - - ``policy.role.permissions:upd*`` to find IAM policy - bindings that specify a role containing "upd" as a - prefix of any word in the role permission. Note that - if callers don't have ``iam.roles.get`` access to a - role's included permissions, policy bindings that - specify this role will be dropped from the search - results. - - ``resource:organizations/123456`` to find IAM policy - bindings that are set on "organizations/123456". - - ``resource=//cloudresourcemanager.googleapis.com/projects/myproject`` - to find IAM policy bindings that are set on the - project named "myproject". - - ``Important`` to find IAM policy bindings that contain - "Important" as a word in any of the searchable fields - (except for the included permissions). - - ``resource:(instance1 OR instance2) policy:amy`` to - find IAM policy bindings that are set on resources - "instance1" or "instance2" and also specify user - "amy". - - ``roles:roles/compute.admin`` to find IAM policy - bindings that specify the Compute Admin role. - - ``memberTypes:user`` to find IAM policy bindings that - contain the principal type "user". + * `policy:amy@gmail.com` to find IAM + policy bindings that specify user + "amy@gmail.com". + * `policy:roles/compute.admin` to find + IAM policy bindings that specify the + Compute Admin role. + * `policy:comp*` to find IAM policy + bindings that contain "comp" as a + prefix of any word in the binding. + * + `policy.role.permissions:storage.buckets.update` + to find IAM policy bindings that + specify a role containing + "storage.buckets.update" permission. + Note that if callers don't have + `iam.roles.get` access to a role's + included permissions, policy bindings + that specify this role will be dropped + from the search results. + * `policy.role.permissions:upd*` to find + IAM policy bindings that specify a + role containing "upd" as a prefix of any + word in the role permission. Note that + if callers don't have `iam.roles.get` + access to a role's included + permissions, policy bindings that + specify this role will be dropped from + the search results. + * `resource:organizations/123456` to + find IAM policy bindings that are set + on "organizations/123456". + * + `resource=//cloudresourcemanager.googleapis.com/projects/myproject` + to find IAM policy bindings that are + set on the project named "myproject". * + `Important` to find IAM policy bindings + that contain "Important" as a word in + any of the searchable fields (except for + the included permissions). + * `resource:(instance1 OR instance2) + policy:amy` to find IAM policy + bindings that are set on resources + "instance1" or "instance2" and also + specify user "amy". * + `roles:roles/compute.admin` to find IAM + policy bindings that specify the + Compute Admin role. + * `memberTypes:user` to find IAM policy + bindings that contain the principal + type "user". This corresponds to the ``query`` field on the ``request`` instance; if ``request`` is provided, this @@ -2033,7 +2101,7 @@ def sample_analyze_iam_policy(): Returns: google.cloud.asset_v1.types.AnalyzeIamPolicyResponse: A response message for - [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. + [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. """ # Create or coerce a protobuf request object. @@ -2075,18 +2143,19 @@ def analyze_iam_policy_longrunning(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Analyzes IAM policies asynchronously to answer which identities - have what accesses on which resources, and writes the analysis - results to a Google Cloud Storage or a BigQuery destination. For - Cloud Storage destination, the output format is the JSON format - that represents a + r"""Analyzes IAM policies asynchronously to answer which + identities have what accesses on which resources, and + writes the analysis results to a Google Cloud Storage or + a BigQuery destination. For Cloud Storage destination, + the output format is the JSON format that represents a [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the [google.longrunning.Operation][google.longrunning.Operation], - which allows you to track the operation status. We recommend - intervals of at least 2 seconds with exponential backoff retry - to poll the operation result. The metadata contains the metadata - for the long-running operation. + which allows you to track the operation status. We + recommend intervals of at least 2 seconds with + exponential backoff retry to poll the operation result. + The metadata contains the metadata for the long-running + operation. .. code-block:: python @@ -2139,10 +2208,13 @@ def sample_analyze_iam_policy_longrunning(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse` A response message for - [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningResponse` + A response message for + [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]. """ # Create or coerce a protobuf request object. @@ -2284,20 +2356,20 @@ def query_assets(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> asset_service.QueryAssetsResponse: - r"""Issue a job that queries assets using a SQL statement compatible - with `BigQuery Standard - SQL `__. + r"""Issue a job that queries assets using a SQL statement + compatible with [BigQuery Standard + SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). - If the query execution finishes within timeout and there's no - pagination, the full query results will be returned in the - ``QueryAssetsResponse``. + If the query execution finishes within timeout and + there's no pagination, the full query results will be + returned in the `QueryAssetsResponse`. - Otherwise, full query results can be obtained by issuing extra - requests with the ``job_reference`` from the a previous - ``QueryAssets`` call. + Otherwise, full query results can be obtained by issuing + extra requests with the `job_reference` from the a + previous `QueryAssets` call. - Note, the query result has approximately 10 GB limitation - enforced by BigQuery + Note, the query result has approximately 10 GB + limitation enforced by BigQuery https://cloud.google.com/bigquery/docs/best-practices-performance-output, queries return larger results will result in errors. @@ -2419,35 +2491,42 @@ def sample_create_saved_query(): request (Union[google.cloud.asset_v1.types.CreateSavedQueryRequest, dict]): The request object. Request to create a saved query. parent (str): - Required. The name of the project/folder/organization - where this saved_query should be created in. It can only - be an organization number (such as "organizations/123"), - a folder number (such as "folders/123"), a project ID - (such as "projects/my-project-id"), or a project number - (such as "projects/12345"). + Required. The name of the + project/folder/organization where this + saved_query should be created in. It can + only be an organization number (such as + "organizations/123"), a folder number + (such as "folders/123"), a project ID + (such as "projects/my-project-id"), or a + project number (such as + "projects/12345"). This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. saved_query (google.cloud.asset_v1.types.SavedQuery): - Required. The saved_query details. The ``name`` field - must be empty as it will be generated based on the - parent and saved_query_id. + Required. The saved_query details. + The `name` field must be empty as it + will be generated based on the parent + and saved_query_id. This corresponds to the ``saved_query`` field on the ``request`` instance; if ``request`` is provided, this should not be set. saved_query_id (str): - Required. The ID to use for the saved query, which must - be unique in the specified parent. It will become the - final component of the saved query's resource name. + Required. The ID to use for the saved + query, which must be unique in the + specified parent. It will become the + final component of the saved query's + resource name. - This value should be 4-63 characters, and valid - characters are ``[a-z][0-9]-``. + This value should be 4-63 characters, + and valid characters are `[a-z][0-9]-`. - Notice that this field is required in the saved query - creation, and the ``name`` field of the ``saved_query`` - will be ignored. + Notice that this field is required in + the saved query creation, and the `name` + field of the `saved_query` will be + ignored. This corresponds to the ``saved_query_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -2554,12 +2633,14 @@ def sample_get_saved_query(): request (Union[google.cloud.asset_v1.types.GetSavedQueryRequest, dict]): The request object. Request to get a saved query. name (str): - Required. The name of the saved query and it must be in - the format of: - - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id + Required. The name of the saved query + and it must be in the format of: + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -2789,12 +2870,16 @@ def sample_update_saved_query(): saved_query (google.cloud.asset_v1.types.SavedQuery): Required. The saved query to update. - The saved query's ``name`` field is used to identify the - one to update, which has format as below: + The saved query's `name` field is used + to identify the one to update, which has + format as below: - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id This corresponds to the ``saved_query`` field on the ``request`` instance; if ``request`` is provided, this @@ -2903,12 +2988,15 @@ def sample_delete_saved_query(): request (Union[google.cloud.asset_v1.types.DeleteSavedQueryRequest, dict]): The request object. Request to delete a saved query. name (str): - Required. The name of the saved query to delete. It must - be in the format of: + Required. The name of the saved query + to delete. It must be in the format of: - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -3013,7 +3101,7 @@ def sample_batch_get_effective_iam_policies(): Returns: google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesResponse: A response message for - [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies]. + [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies]. """ # Create or coerce a protobuf request object. @@ -3093,11 +3181,12 @@ def sample_analyze_org_policies(): The request object. A request message for [AssetService.AnalyzeOrgPolicies][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicies]. scope (str): - Required. The organization to scope the request. Only - organization policies within the scope will be analyzed. + Required. The organization to scope + the request. Only organization policies + within the scope will be analyzed. - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/123456") This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this @@ -3116,12 +3205,14 @@ def sample_analyze_org_policies(): The expression to filter [AnalyzeOrgPoliciesResponse.org_policy_results][google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.org_policy_results]. The only supported field is - ``consolidated_policy.attached_resource``, and the only - supported operator is ``=``. + `consolidated_policy.attached_resource`, + and the only supported operator is `=`. Example: + consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001" - will return the org policy results of"folders/001". + will return the org policy results + of"folders/001". This corresponds to the ``filter`` field on the ``request`` instance; if ``request`` is provided, this @@ -3137,10 +3228,11 @@ def sample_analyze_org_policies(): Returns: google.cloud.asset_v1.services.asset_service.pagers.AnalyzeOrgPoliciesPager: The response message for - [AssetService.AnalyzeOrgPolicies][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicies]. + [AssetService.AnalyzeOrgPolicies][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicies]. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -3248,13 +3340,15 @@ def sample_analyze_org_policy_governed_containers(): The request object. A request message for [AssetService.AnalyzeOrgPolicyGovernedContainers][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedContainers]. scope (str): - Required. The organization to scope the request. Only - organization policies within the scope will be analyzed. - The output containers will also be limited to the ones - governed by those in-scope organization policies. + Required. The organization to scope + the request. Only organization policies + within the scope will be analyzed. The + output containers will also be limited + to the ones governed by those in-scope + organization policies. - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/123456") This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this @@ -3269,13 +3363,16 @@ def sample_analyze_org_policy_governed_containers(): on the ``request`` instance; if ``request`` is provided, this should not be set. filter (str): - The expression to filter the governed containers in - result. The only supported field is ``parent``, and the - only supported operator is ``=``. + The expression to filter the governed + containers in result. The only supported + field is `parent`, and the only + supported operator is `=`. Example: + parent="//cloudresourcemanager.googleapis.com/folders/001" - will return all containers under "folders/001". + will return all containers under + "folders/001". This corresponds to the ``filter`` field on the ``request`` instance; if ``request`` is provided, this @@ -3291,10 +3388,11 @@ def sample_analyze_org_policy_governed_containers(): Returns: google.cloud.asset_v1.services.asset_service.pagers.AnalyzeOrgPolicyGovernedContainersPager: The response message for - [AssetService.AnalyzeOrgPolicyGovernedContainers][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedContainers]. + [AssetService.AnalyzeOrgPolicyGovernedContainers][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedContainers]. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -3366,24 +3464,25 @@ def analyze_org_policy_governed_assets(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.AnalyzeOrgPolicyGovernedAssetsPager: - r"""Analyzes organization policies governed assets (Google Cloud - resources or policies) under a scope. This RPC supports custom - constraints and the following 10 canned constraints: - - - storage.uniformBucketLevelAccess - - iam.disableServiceAccountKeyCreation - - iam.allowedPolicyMemberDomains - - compute.vmExternalIpAccess - - appengine.enforceServiceAccountActAsCheck - - gcp.resourceLocations - - compute.trustedImageProjects - - compute.skipDefaultNetworkCreation - - compute.requireOsLogin - - compute.disableNestedVirtualization - - This RPC only returns either resources of types supported by - `searchable asset - types `__, + r"""Analyzes organization policies governed assets + (Google Cloud resources or policies) under a scope. This + RPC supports custom constraints and the following 10 + canned constraints: + + * storage.uniformBucketLevelAccess + * iam.disableServiceAccountKeyCreation + * iam.allowedPolicyMemberDomains + * compute.vmExternalIpAccess + * appengine.enforceServiceAccountActAsCheck + * gcp.resourceLocations + * compute.trustedImageProjects + * compute.skipDefaultNetworkCreation + * compute.requireOsLogin + * compute.disableNestedVirtualization + + This RPC only returns either resources of types + supported by [searchable asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types), or IAM policies. .. code-block:: python @@ -3419,13 +3518,15 @@ def sample_analyze_org_policy_governed_assets(): The request object. A request message for [AssetService.AnalyzeOrgPolicyGovernedAssets][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedAssets]. scope (str): - Required. The organization to scope the request. Only - organization policies within the scope will be analyzed. - The output assets will also be limited to the ones - governed by those in-scope organization policies. + Required. The organization to scope + the request. Only organization policies + within the scope will be analyzed. The + output assets will also be limited to + the ones governed by those in-scope + organization policies. - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/123456") This corresponds to the ``scope`` field on the ``request`` instance; if ``request`` is provided, this @@ -3441,24 +3542,29 @@ def sample_analyze_org_policy_governed_assets(): on the ``request`` instance; if ``request`` is provided, this should not be set. filter (str): - The expression to filter the governed assets in result. - The only supported fields for governed resources are - ``governed_resource.project`` and - ``governed_resource.folders``. The only supported fields - for governed iam policies are - ``governed_iam_policy.project`` and - ``governed_iam_policy.folders``. The only supported - operator is ``=``. - - Example 1: governed_resource.project="projects/12345678" - filter will return all governed resources under - projects/12345678 including the project ifself, if + The expression to filter the governed + assets in result. The only supported + fields for governed resources are + `governed_resource.project` and + `governed_resource.folders`. The only + supported fields for governed iam + policies are + `governed_iam_policy.project` and + `governed_iam_policy.folders`. The only + supported operator is `=`. + + Example 1: + governed_resource.project="projects/12345678" + filter will return all governed + resources under projects/12345678 + including the project ifself, if applicable. Example 2: - governed_iam_policy.folders="folders/12345678" filter - will return all governed iam policies under - folders/12345678, if applicable. + governed_iam_policy.folders="folders/12345678" + filter will return all governed iam + policies under folders/12345678, if + applicable. This corresponds to the ``filter`` field on the ``request`` instance; if ``request`` is provided, this @@ -3474,10 +3580,11 @@ def sample_analyze_org_policy_governed_assets(): Returns: google.cloud.asset_v1.services.asset_service.pagers.AnalyzeOrgPolicyGovernedAssetsPager: The response message for - [AssetService.AnalyzeOrgPolicyGovernedAssets][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedAssets]. + [AssetService.AnalyzeOrgPolicyGovernedAssets][google.cloud.asset.v1.AssetService.AnalyzeOrgPolicyGovernedAssets]. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/grpc.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/grpc.py index 1edf735194..6c8103049d 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/grpc.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/grpc.py @@ -335,19 +335,20 @@ def export_assets(self) -> Callable[ operations_pb2.Operation]: r"""Return a callable for the export assets method over gRPC. - Exports assets with time and resource types to a given Cloud - Storage location/BigQuery table. For Cloud Storage location - destinations, the output format is newline-delimited JSON. Each - line represents a - [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in - the JSON format; for BigQuery table destinations, the output - table stores the fields in asset Protobuf as columns. This API - implements the + Exports assets with time and resource types to a + given Cloud Storage location/BigQuery table. For Cloud + Storage location destinations, the output format is + newline-delimited JSON. Each line represents a + [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] + in the JSON format; for BigQuery table destinations, the + output table stores the fields in asset Protobuf as + columns. This API implements the [google.longrunning.Operation][google.longrunning.Operation] - API, which allows you to keep track of the export. We recommend - intervals of at least 2 seconds with exponential retry to poll - the export operation result. For regular-size resource parent, - the export operation usually finishes within 5 minutes. + API, which allows you to keep track of the export. We + recommend intervals of at least 2 seconds with + exponential retry to poll the export operation result. + For regular-size resource parent, the export operation + usually finishes within 5 minutes. Returns: Callable[[~.ExportAssetsRequest], @@ -400,12 +401,13 @@ def batch_get_assets_history(self) -> Callable[ asset_service.BatchGetAssetsHistoryResponse]: r"""Return a callable for the batch get assets history method over gRPC. - Batch gets the update history of assets that overlap a time - window. For IAM_POLICY content, this API outputs history when - the asset and its attached IAM POLICY both exist. This can - create gaps in the output history. Otherwise, this API outputs - history with asset in both non-delete or deleted status. If a - specified asset does not exist, this API returns an + Batch gets the update history of assets that overlap + a time window. For IAM_POLICY content, this API outputs + history when the asset and its attached IAM POLICY both + exist. This can create gaps in the output history. + Otherwise, this API outputs history with asset in both + non-delete or deleted status. + If a specified asset does not exist, this API returns an INVALID_ARGUMENT error. Returns: @@ -565,10 +567,11 @@ def search_all_resources(self) -> Callable[ asset_service.SearchAllResourcesResponse]: r"""Return a callable for the search all resources method over gRPC. - Searches all Google Cloud resources within the specified scope, - such as a project, folder, or organization. The caller must be - granted the ``cloudasset.assets.searchAllResources`` permission - on the desired scope, otherwise the request will be rejected. + Searches all Google Cloud resources within the + specified scope, such as a project, folder, or + organization. The caller must be granted the + `cloudasset.assets.searchAllResources` permission on the + desired scope, otherwise the request will be rejected. Returns: Callable[[~.SearchAllResourcesRequest], @@ -594,10 +597,12 @@ def search_all_iam_policies(self) -> Callable[ asset_service.SearchAllIamPoliciesResponse]: r"""Return a callable for the search all iam policies method over gRPC. - Searches all IAM policies within the specified scope, such as a - project, folder, or organization. The caller must be granted the - ``cloudasset.assets.searchAllIamPolicies`` permission on the - desired scope, otherwise the request will be rejected. + Searches all IAM policies within the specified scope, + such as a project, folder, or organization. The caller + must be granted the + `cloudasset.assets.searchAllIamPolicies` permission on + the desired scope, otherwise the request will be + rejected. Returns: Callable[[~.SearchAllIamPoliciesRequest], @@ -650,18 +655,19 @@ def analyze_iam_policy_longrunning(self) -> Callable[ operations_pb2.Operation]: r"""Return a callable for the analyze iam policy longrunning method over gRPC. - Analyzes IAM policies asynchronously to answer which identities - have what accesses on which resources, and writes the analysis - results to a Google Cloud Storage or a BigQuery destination. For - Cloud Storage destination, the output format is the JSON format - that represents a + Analyzes IAM policies asynchronously to answer which + identities have what accesses on which resources, and + writes the analysis results to a Google Cloud Storage or + a BigQuery destination. For Cloud Storage destination, + the output format is the JSON format that represents a [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the [google.longrunning.Operation][google.longrunning.Operation], - which allows you to track the operation status. We recommend - intervals of at least 2 seconds with exponential backoff retry - to poll the operation result. The metadata contains the metadata - for the long-running operation. + which allows you to track the operation status. We + recommend intervals of at least 2 seconds with + exponential backoff retry to poll the operation result. + The metadata contains the metadata for the long-running + operation. Returns: Callable[[~.AnalyzeIamPolicyLongrunningRequest], @@ -719,20 +725,20 @@ def query_assets(self) -> Callable[ asset_service.QueryAssetsResponse]: r"""Return a callable for the query assets method over gRPC. - Issue a job that queries assets using a SQL statement compatible - with `BigQuery Standard - SQL `__. + Issue a job that queries assets using a SQL statement + compatible with [BigQuery Standard + SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). - If the query execution finishes within timeout and there's no - pagination, the full query results will be returned in the - ``QueryAssetsResponse``. + If the query execution finishes within timeout and + there's no pagination, the full query results will be + returned in the `QueryAssetsResponse`. - Otherwise, full query results can be obtained by issuing extra - requests with the ``job_reference`` from the a previous - ``QueryAssets`` call. + Otherwise, full query results can be obtained by issuing + extra requests with the `job_reference` from the a + previous `QueryAssets` call. - Note, the query result has approximately 10 GB limitation - enforced by BigQuery + Note, the query result has approximately 10 GB + limitation enforced by BigQuery https://cloud.google.com/bigquery/docs/best-practices-performance-output, queries return larger results will result in errors. @@ -974,24 +980,25 @@ def analyze_org_policy_governed_assets(self) -> Callable[ r"""Return a callable for the analyze org policy governed assets method over gRPC. - Analyzes organization policies governed assets (Google Cloud - resources or policies) under a scope. This RPC supports custom - constraints and the following 10 canned constraints: - - - storage.uniformBucketLevelAccess - - iam.disableServiceAccountKeyCreation - - iam.allowedPolicyMemberDomains - - compute.vmExternalIpAccess - - appengine.enforceServiceAccountActAsCheck - - gcp.resourceLocations - - compute.trustedImageProjects - - compute.skipDefaultNetworkCreation - - compute.requireOsLogin - - compute.disableNestedVirtualization - - This RPC only returns either resources of types supported by - `searchable asset - types `__, + Analyzes organization policies governed assets + (Google Cloud resources or policies) under a scope. This + RPC supports custom constraints and the following 10 + canned constraints: + + * storage.uniformBucketLevelAccess + * iam.disableServiceAccountKeyCreation + * iam.allowedPolicyMemberDomains + * compute.vmExternalIpAccess + * appengine.enforceServiceAccountActAsCheck + * gcp.resourceLocations + * compute.trustedImageProjects + * compute.skipDefaultNetworkCreation + * compute.requireOsLogin + * compute.disableNestedVirtualization + + This RPC only returns either resources of types + supported by [searchable asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types), or IAM policies. Returns: diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/grpc_asyncio.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/grpc_asyncio.py index a2b4aeb11a..bcbff86868 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/grpc_asyncio.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/grpc_asyncio.py @@ -341,19 +341,20 @@ def export_assets(self) -> Callable[ Awaitable[operations_pb2.Operation]]: r"""Return a callable for the export assets method over gRPC. - Exports assets with time and resource types to a given Cloud - Storage location/BigQuery table. For Cloud Storage location - destinations, the output format is newline-delimited JSON. Each - line represents a - [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in - the JSON format; for BigQuery table destinations, the output - table stores the fields in asset Protobuf as columns. This API - implements the + Exports assets with time and resource types to a + given Cloud Storage location/BigQuery table. For Cloud + Storage location destinations, the output format is + newline-delimited JSON. Each line represents a + [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] + in the JSON format; for BigQuery table destinations, the + output table stores the fields in asset Protobuf as + columns. This API implements the [google.longrunning.Operation][google.longrunning.Operation] - API, which allows you to keep track of the export. We recommend - intervals of at least 2 seconds with exponential retry to poll - the export operation result. For regular-size resource parent, - the export operation usually finishes within 5 minutes. + API, which allows you to keep track of the export. We + recommend intervals of at least 2 seconds with + exponential retry to poll the export operation result. + For regular-size resource parent, the export operation + usually finishes within 5 minutes. Returns: Callable[[~.ExportAssetsRequest], @@ -406,12 +407,13 @@ def batch_get_assets_history(self) -> Callable[ Awaitable[asset_service.BatchGetAssetsHistoryResponse]]: r"""Return a callable for the batch get assets history method over gRPC. - Batch gets the update history of assets that overlap a time - window. For IAM_POLICY content, this API outputs history when - the asset and its attached IAM POLICY both exist. This can - create gaps in the output history. Otherwise, this API outputs - history with asset in both non-delete or deleted status. If a - specified asset does not exist, this API returns an + Batch gets the update history of assets that overlap + a time window. For IAM_POLICY content, this API outputs + history when the asset and its attached IAM POLICY both + exist. This can create gaps in the output history. + Otherwise, this API outputs history with asset in both + non-delete or deleted status. + If a specified asset does not exist, this API returns an INVALID_ARGUMENT error. Returns: @@ -571,10 +573,11 @@ def search_all_resources(self) -> Callable[ Awaitable[asset_service.SearchAllResourcesResponse]]: r"""Return a callable for the search all resources method over gRPC. - Searches all Google Cloud resources within the specified scope, - such as a project, folder, or organization. The caller must be - granted the ``cloudasset.assets.searchAllResources`` permission - on the desired scope, otherwise the request will be rejected. + Searches all Google Cloud resources within the + specified scope, such as a project, folder, or + organization. The caller must be granted the + `cloudasset.assets.searchAllResources` permission on the + desired scope, otherwise the request will be rejected. Returns: Callable[[~.SearchAllResourcesRequest], @@ -600,10 +603,12 @@ def search_all_iam_policies(self) -> Callable[ Awaitable[asset_service.SearchAllIamPoliciesResponse]]: r"""Return a callable for the search all iam policies method over gRPC. - Searches all IAM policies within the specified scope, such as a - project, folder, or organization. The caller must be granted the - ``cloudasset.assets.searchAllIamPolicies`` permission on the - desired scope, otherwise the request will be rejected. + Searches all IAM policies within the specified scope, + such as a project, folder, or organization. The caller + must be granted the + `cloudasset.assets.searchAllIamPolicies` permission on + the desired scope, otherwise the request will be + rejected. Returns: Callable[[~.SearchAllIamPoliciesRequest], @@ -656,18 +661,19 @@ def analyze_iam_policy_longrunning(self) -> Callable[ Awaitable[operations_pb2.Operation]]: r"""Return a callable for the analyze iam policy longrunning method over gRPC. - Analyzes IAM policies asynchronously to answer which identities - have what accesses on which resources, and writes the analysis - results to a Google Cloud Storage or a BigQuery destination. For - Cloud Storage destination, the output format is the JSON format - that represents a + Analyzes IAM policies asynchronously to answer which + identities have what accesses on which resources, and + writes the analysis results to a Google Cloud Storage or + a BigQuery destination. For Cloud Storage destination, + the output format is the JSON format that represents a [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the [google.longrunning.Operation][google.longrunning.Operation], - which allows you to track the operation status. We recommend - intervals of at least 2 seconds with exponential backoff retry - to poll the operation result. The metadata contains the metadata - for the long-running operation. + which allows you to track the operation status. We + recommend intervals of at least 2 seconds with + exponential backoff retry to poll the operation result. + The metadata contains the metadata for the long-running + operation. Returns: Callable[[~.AnalyzeIamPolicyLongrunningRequest], @@ -725,20 +731,20 @@ def query_assets(self) -> Callable[ Awaitable[asset_service.QueryAssetsResponse]]: r"""Return a callable for the query assets method over gRPC. - Issue a job that queries assets using a SQL statement compatible - with `BigQuery Standard - SQL `__. + Issue a job that queries assets using a SQL statement + compatible with [BigQuery Standard + SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). - If the query execution finishes within timeout and there's no - pagination, the full query results will be returned in the - ``QueryAssetsResponse``. + If the query execution finishes within timeout and + there's no pagination, the full query results will be + returned in the `QueryAssetsResponse`. - Otherwise, full query results can be obtained by issuing extra - requests with the ``job_reference`` from the a previous - ``QueryAssets`` call. + Otherwise, full query results can be obtained by issuing + extra requests with the `job_reference` from the a + previous `QueryAssets` call. - Note, the query result has approximately 10 GB limitation - enforced by BigQuery + Note, the query result has approximately 10 GB + limitation enforced by BigQuery https://cloud.google.com/bigquery/docs/best-practices-performance-output, queries return larger results will result in errors. @@ -980,24 +986,25 @@ def analyze_org_policy_governed_assets(self) -> Callable[ r"""Return a callable for the analyze org policy governed assets method over gRPC. - Analyzes organization policies governed assets (Google Cloud - resources or policies) under a scope. This RPC supports custom - constraints and the following 10 canned constraints: - - - storage.uniformBucketLevelAccess - - iam.disableServiceAccountKeyCreation - - iam.allowedPolicyMemberDomains - - compute.vmExternalIpAccess - - appengine.enforceServiceAccountActAsCheck - - gcp.resourceLocations - - compute.trustedImageProjects - - compute.skipDefaultNetworkCreation - - compute.requireOsLogin - - compute.disableNestedVirtualization - - This RPC only returns either resources of types supported by - `searchable asset - types `__, + Analyzes organization policies governed assets + (Google Cloud resources or policies) under a scope. This + RPC supports custom constraints and the following 10 + canned constraints: + + * storage.uniformBucketLevelAccess + * iam.disableServiceAccountKeyCreation + * iam.allowedPolicyMemberDomains + * compute.vmExternalIpAccess + * appengine.enforceServiceAccountActAsCheck + * gcp.resourceLocations + * compute.trustedImageProjects + * compute.skipDefaultNetworkCreation + * compute.requireOsLogin + * compute.disableNestedVirtualization + + This RPC only returns either resources of types + supported by [searchable asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types), or IAM policies. Returns: diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/types/asset_service.py b/tests/integration/goldens/asset/google/cloud/asset_v1/types/asset_service.py index 3caaefee47..a2a39db101 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/types/asset_service.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/types/asset_service.py @@ -164,27 +164,31 @@ class ExportAssetsRequest(proto.Message): window during which running the same query may get different results. asset_types (MutableSequence[str]): - A list of asset types to take a snapshot for. For example: - "compute.googleapis.com/Disk". - - Regular expressions are also supported. For example: - - - "compute.googleapis.com.\*" snapshots resources whose - asset type starts with "compute.googleapis.com". - - ".*Instance" snapshots resources whose asset type ends - with "Instance". - - ".\ *Instance.*" snapshots resources whose asset type - contains "Instance". - - See `RE2 `__ for - all supported regular expression syntax. If the regular - expression does not match any supported asset type, an - INVALID_ARGUMENT error will be returned. - - If specified, only matching assets will be returned, - otherwise, it will snapshot all asset types. See - `Introduction to Cloud Asset - Inventory `__ + A list of asset types to take a snapshot for. + For example: "compute.googleapis.com/Disk". + + Regular expressions are also supported. For + example: + + * "compute.googleapis.com.*" snapshots resources + whose asset type starts with + "compute.googleapis.com". + * ".*Instance" snapshots resources whose asset + type ends with "Instance". * ".*Instance.*" + snapshots resources whose asset type contains + "Instance". + + See + [RE2](https://github.com/google/re2/wiki/Syntax) + for all supported regular expression syntax. If + the regular expression does not match any + supported asset type, an INVALID_ARGUMENT error + will be returned. + + If specified, only matching assets will be + returned, otherwise, it will snapshot all asset + types. See [Introduction to Cloud Asset + Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all supported asset types. content_type (google.cloud.asset_v1.types.ContentType): Asset content type. If not specified, no @@ -193,22 +197,28 @@ class ExportAssetsRequest(proto.Message): Required. Output configuration indicating where the results will be output to. relationship_types (MutableSequence[str]): - A list of relationship types to export, for example: - ``INSTANCE_TO_INSTANCEGROUP``. This field should only be - specified if content_type=RELATIONSHIP. - - - If specified: it snapshots specified relationships. It - returns an error if any of the [relationship_types] - doesn't belong to the supported relationship types of the - [asset_types] or if any of the [asset_types] doesn't - belong to the source types of the [relationship_types]. - - Otherwise: it snapshots the supported relationships for - all [asset_types] or returns an error if any of the - [asset_types] has no relationship support. An unspecified - asset types field means all supported asset_types. See - `Introduction to Cloud Asset - Inventory `__ - for all supported asset types and relationship types. + A list of relationship types to export, for + example: `INSTANCE_TO_INSTANCEGROUP`. This field + should only be specified if + content_type=RELATIONSHIP. + * If specified: + + it snapshots specified relationships. It returns + an error if any of the [relationship_types] + doesn't belong to the supported relationship + types of the [asset_types] or if any of the + [asset_types] doesn't belong to the source types + of the [relationship_types]. * Otherwise: + + it snapshots the supported relationships for all + [asset_types] or returns an error if any of the + [asset_types] has no relationship support. An + unspecified asset types field means all + supported asset_types. See [Introduction to + Cloud Asset + Inventory](https://cloud.google.com/asset-inventory/docs/overview) + for all supported asset types and relationship + types. """ parent: str = proto.Field( @@ -254,12 +264,14 @@ class ExportAssetsResponse(proto.Message): Output configuration indicating where the results were output to. output_result (google.cloud.asset_v1.types.OutputResult): - Output result indicating where the assets were exported to. - For example, a set of actual Cloud Storage object URIs where - the assets are exported to. The URIs can be different from - what [output_config] has specified, as the service will - split the output object into multiple ones once it exceeds a - single Cloud Storage object limit. + Output result indicating where the assets + were exported to. For example, a set of actual + Cloud Storage object URIs where the assets are + exported to. The URIs can be different from what + [output_config] has specified, as the service + will split the output object into multiple ones + once it exceeds a single Cloud Storage object + limit. """ read_time: timestamp_pb2.Timestamp = proto.Field( @@ -284,13 +296,14 @@ class ListAssetsRequest(proto.Message): Attributes: parent (str): - Required. Name of the organization, folder, or project the - assets belong to. Format: + Required. Name of the organization, folder, + or project the assets belong to. Format: "organizations/[organization-number]" (such as - "organizations/123"), "projects/[project-id]" (such as - "projects/my-project-id"), "projects/[project-number]" (such - as "projects/12345"), or "folders/[folder-number]" (such as - "folders/12345"). + "organizations/123"), "projects/[project-id]" + (such as "projects/my-project-id"), + "projects/[project-number]" (such as + "projects/12345"), or "folders/[folder-number]" + (such as "folders/12345"). read_time (google.protobuf.timestamp_pb2.Timestamp): Timestamp to take an asset snapshot. This can only be set to a timestamp between the current @@ -301,27 +314,31 @@ class ListAssetsRequest(proto.Message): window during which running the same query may get different results. asset_types (MutableSequence[str]): - A list of asset types to take a snapshot for. For example: - "compute.googleapis.com/Disk". - - Regular expression is also supported. For example: - - - "compute.googleapis.com.\*" snapshots resources whose - asset type starts with "compute.googleapis.com". - - ".*Instance" snapshots resources whose asset type ends - with "Instance". - - ".\ *Instance.*" snapshots resources whose asset type - contains "Instance". - - See `RE2 `__ for - all supported regular expression syntax. If the regular - expression does not match any supported asset type, an - INVALID_ARGUMENT error will be returned. - - If specified, only matching assets will be returned, - otherwise, it will snapshot all asset types. See - `Introduction to Cloud Asset - Inventory `__ + A list of asset types to take a snapshot for. + For example: "compute.googleapis.com/Disk". + + Regular expression is also supported. For + example: + + * "compute.googleapis.com.*" snapshots resources + whose asset type starts with + "compute.googleapis.com". + * ".*Instance" snapshots resources whose asset + type ends with "Instance". * ".*Instance.*" + snapshots resources whose asset type contains + "Instance". + + See + [RE2](https://github.com/google/re2/wiki/Syntax) + for all supported regular expression syntax. If + the regular expression does not match any + supported asset type, an INVALID_ARGUMENT error + will be returned. + + If specified, only matching assets will be + returned, otherwise, it will snapshot all asset + types. See [Introduction to Cloud Asset + Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all supported asset types. content_type (google.cloud.asset_v1.types.ContentType): Asset content type. If not specified, no @@ -331,28 +348,34 @@ class ListAssetsRequest(proto.Message): in a single response. Default is 100, minimum is 1, and maximum is 1000. page_token (str): - The ``next_page_token`` returned from the previous - ``ListAssetsResponse``, or unspecified for the first - ``ListAssetsRequest``. It is a continuation of a prior - ``ListAssets`` call, and the API should return the next page - of assets. + The `next_page_token` returned from the + previous `ListAssetsResponse`, or unspecified + for the first `ListAssetsRequest`. It is a + continuation of a prior `ListAssets` call, and + the API should return the next page of assets. relationship_types (MutableSequence[str]): - A list of relationship types to output, for example: - ``INSTANCE_TO_INSTANCEGROUP``. This field should only be - specified if content_type=RELATIONSHIP. - - - If specified: it snapshots specified relationships. It - returns an error if any of the [relationship_types] - doesn't belong to the supported relationship types of the - [asset_types] or if any of the [asset_types] doesn't - belong to the source types of the [relationship_types]. - - Otherwise: it snapshots the supported relationships for - all [asset_types] or returns an error if any of the - [asset_types] has no relationship support. An unspecified - asset types field means all supported asset_types. See - `Introduction to Cloud Asset - Inventory `__ - for all supported asset types and relationship types. + A list of relationship types to output, for + example: `INSTANCE_TO_INSTANCEGROUP`. This field + should only be specified if + content_type=RELATIONSHIP. + * If specified: + + it snapshots specified relationships. It returns + an error if any of the [relationship_types] + doesn't belong to the supported relationship + types of the [asset_types] or if any of the + [asset_types] doesn't belong to the source types + of the [relationship_types]. * Otherwise: + + it snapshots the supported relationships for all + [asset_types] or returns an error if any of the + [asset_types] has no relationship support. An + unspecified asset types field means all + supported asset_types. See [Introduction to + Cloud Asset + Inventory](https://cloud.google.com/asset-inventory/docs/overview) + for all supported asset types and relationship + types. """ parent: str = proto.Field( @@ -433,42 +456,52 @@ class BatchGetAssetsHistoryRequest(proto.Message): (such as "projects/my-project-id")", or a project number (such as "projects/12345"). asset_names (MutableSequence[str]): - A list of the full names of the assets. See: + A list of the full names of the assets. + See: https://cloud.google.com/asset-inventory/docs/resource-name-format Example: - ``//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1``. + `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - The request becomes a no-op if the asset name list is empty, - and the max size of the asset name list is 100 in one - request. + The request becomes a no-op if the asset name + list is empty, and the max size of the asset + name list is 100 in one request. content_type (google.cloud.asset_v1.types.ContentType): Optional. The content type. read_time_window (google.cloud.asset_v1.types.TimeWindow): - Optional. The time window for the asset history. Both - start_time and end_time are optional and if set, it must be - after the current time minus 35 days. If end_time is not - set, it is default to current timestamp. If start_time is - not set, the snapshot of the assets at end_time will be - returned. The returned results contain all temporal assets + Optional. The time window for the asset + history. Both start_time and end_time are + optional and if set, it must be after the + current time minus 35 days. If end_time is not + set, it is default to current timestamp. If + start_time is not set, the snapshot of the + assets at end_time will be returned. The + returned results contain all temporal assets whose time window overlap with read_time_window. relationship_types (MutableSequence[str]): - Optional. A list of relationship types to output, for - example: ``INSTANCE_TO_INSTANCEGROUP``. This field should + Optional. A list of relationship types to + output, for example: + `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if content_type=RELATIONSHIP. - - - If specified: it outputs specified relationships' history - on the [asset_names]. It returns an error if any of the - [relationship_types] doesn't belong to the supported - relationship types of the [asset_names] or if any of the - [asset_names]'s types doesn't belong to the source types - of the [relationship_types]. - - Otherwise: it outputs the supported relationships' history - on the [asset_names] or returns an error if any of the - [asset_names]'s types has no relationship support. See - `Introduction to Cloud Asset - Inventory `__ - for all supported asset types and relationship types. + * If specified: + + it outputs specified relationships' history on + the [asset_names]. It returns an error if any of + the [relationship_types] doesn't belong to the + supported relationship types of the + [asset_names] or if any of the [asset_names]'s + types doesn't belong to the source types of the + [relationship_types]. + * Otherwise: + + it outputs the supported relationships' history + on the [asset_names] or returns an error if any + of the [asset_names]'s types has no relationship + support. + See [Introduction to Cloud Asset + Inventory](https://cloud.google.com/asset-inventory/docs/overview) + for all supported asset types and relationship + types. """ parent: str = proto.Field( @@ -528,9 +561,9 @@ class CreateFeedRequest(proto.Message): feed identifier and it needs to be unique under a specific parent project/folder/organization. feed (google.cloud.asset_v1.types.Feed): - Required. The feed details. The field ``name`` must be empty - and it will be generated in the format of: - projects/project_number/feeds/feed_id + Required. The feed details. The field `name` + must be empty and it will be generated in the + format of: projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id """ @@ -555,8 +588,9 @@ class GetFeedRequest(proto.Message): Attributes: name (str): - Required. The name of the Feed and it must be in the format - of: projects/project_number/feeds/feed_id + Required. The name of the Feed and it must be + in the format of: + projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id """ @@ -606,15 +640,18 @@ class UpdateFeedRequest(proto.Message): Attributes: feed (google.cloud.asset_v1.types.Feed): - Required. The new values of feed details. It must match an - existing feed and the field ``name`` must be in the format - of: projects/project_number/feeds/feed_id or + Required. The new values of feed details. It + must match an existing feed and the field `name` + must be in the format of: + + projects/project_number/feeds/feed_id or folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Required. Only updates the ``feed`` fields indicated by this - mask. The field mask must not be empty, and it must not - contain fields that are immutable or only set by the server. + Required. Only updates the `feed` fields + indicated by this mask. The field mask must not + be empty, and it must not contain fields that + are immutable or only set by the server. """ feed: 'Feed' = proto.Field( @@ -634,8 +671,9 @@ class DeleteFeedRequest(proto.Message): Attributes: name (str): - Required. The name of the feed and it must be in the format - of: projects/project_number/feeds/feed_id + Required. The name of the feed and it must be + in the format of: + projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id organizations/organization_number/feeds/feed_id """ @@ -708,8 +746,8 @@ class GcsOutputResult(proto.Message): Attributes: uris (MutableSequence[str]): - List of URIs of the Cloud Storage objects. Example: - "gs://bucket_name/object_name". + List of URIs of the Cloud Storage objects. + Example: "gs://bucket_name/object_name". """ uris: MutableSequence[str] = proto.RepeatedField( @@ -730,28 +768,37 @@ class GcsDestination(proto.Message): Attributes: uri (str): - The URI of the Cloud Storage object. It's the same URI that - is used by gsutil. Example: "gs://bucket_name/object_name". - See `Viewing and Editing Object - Metadata `__ + The URI of the Cloud Storage object. It's the + same URI that is used by gsutil. Example: + "gs://bucket_name/object_name". See [Viewing and + Editing Object + Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) for more information. - If the specified Cloud Storage object already exists and - there is no - `hold `__, + If the specified Cloud Storage object already + exists and there is no + [hold](https://cloud.google.com/storage/docs/object-holds), it will be overwritten with the exported result. This field is a member of `oneof`_ ``object_uri``. uri_prefix (str): - The URI prefix of all generated Cloud Storage objects. - Example: "gs://bucket_name/object_name_prefix". Each object - URI is in format: "gs://bucket_name/object_name_prefix// and - only contains assets for that type. starts from 0. Example: + The URI prefix of all generated Cloud Storage + objects. Example: + "gs://bucket_name/object_name_prefix". Each + object URI is in format: + + "gs://bucket_name/object_name_prefix// and only contains assets + for that type. starts from 0. + Example: + "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" - is the first shard of output objects containing all - compute.googleapis.com/Disk assets. An INVALID_ARGUMENT - error will be returned if file with the same name - "gs://bucket_name/object_name_prefix" already exists. + is the first shard of output objects containing + all compute.googleapis.com/Disk assets. An + INVALID_ARGUMENT error will be returned if file + with the same name + "gs://bucket_name/object_name_prefix" already + exists. This field is a member of `oneof`_ ``object_uri``. """ @@ -774,82 +821,94 @@ class BigQueryDestination(proto.Message): Attributes: dataset (str): Required. The BigQuery dataset in format - "projects/projectId/datasets/datasetId", to which the - snapshot result should be exported. If this dataset does not - exist, the export call returns an INVALID_ARGUMENT error. - Setting the ``contentType`` for ``exportAssets`` determines - the - `schema `__ + "projects/projectId/datasets/datasetId", to + which the snapshot result should be exported. If + this dataset does not exist, the export call + returns an INVALID_ARGUMENT error. Setting the + `contentType` for `exportAssets` determines the + [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema) of the BigQuery table. Setting - ``separateTablesPerAssetType`` to ``TRUE`` also influences - the schema. + `separateTablesPerAssetType` to `TRUE` also + influences the schema. table (str): Required. The BigQuery table to which the snapshot result should be written. If this table does not exist, a new table with the given name will be created. force (bool): - If the destination table already exists and this flag is - ``TRUE``, the table will be overwritten by the contents of - assets snapshot. If the flag is ``FALSE`` or unset and the - destination table already exists, the export call returns an - INVALID_ARGUMEMT error. + If the destination table already exists and + this flag is `TRUE`, the table will be + overwritten by the contents of assets snapshot. + If the flag is `FALSE` or unset and the + destination table already exists, the export + call returns an INVALID_ARGUMEMT error. partition_spec (google.cloud.asset_v1.types.PartitionSpec): - [partition_spec] determines whether to export to partitioned - table(s) and how to partition the data. + [partition_spec] determines whether to export + to partitioned table(s) and how to partition the + data. If [partition_spec] is unset or [partition_spec.partition_key] is unset or - ``PARTITION_KEY_UNSPECIFIED``, the snapshot results will be - exported to non-partitioned table(s). [force] will decide - whether to overwrite existing table(s). - - If [partition_spec] is specified. First, the snapshot - results will be written to partitioned table(s) with two - additional timestamp columns, readTime and requestTime, one - of which will be the partition key. Secondly, in the case - when any destination table already exists, it will first try - to update existing table's schema as necessary by appending - additional columns. Then, if [force] is ``TRUE``, the - corresponding partition will be overwritten by the snapshot - results (data in different partitions will remain intact); - if [force] is unset or ``FALSE``, it will append the data. - An error will be returned if the schema update or data - appension fails. + `PARTITION_KEY_UNSPECIFIED`, the snapshot + results will be exported to non-partitioned + table(s). [force] will decide whether to + overwrite existing table(s). + + If [partition_spec] is specified. First, the + snapshot results will be written to partitioned + table(s) with two additional timestamp columns, + readTime and requestTime, one of which will be + the partition key. Secondly, in the case when + any destination table already exists, it will + first try to update existing table's schema as + necessary by appending additional columns. Then, + if [force] is `TRUE`, the corresponding + partition will be overwritten by the snapshot + results (data in different partitions will + remain intact); if [force] is unset or `FALSE`, + it will append the data. An error will be + returned if the schema update or data appension + fails. separate_tables_per_asset_type (bool): - If this flag is ``TRUE``, the snapshot results will be - written to one or multiple tables, each of which contains - results of one asset type. The [force] and [partition_spec] - fields will apply to each of them. - - Field [table] will be concatenated with "*" and the asset - type names (see + If this flag is `TRUE`, the snapshot results + will be written to one or multiple tables, each + of which contains results of one asset type. The + [force] and [partition_spec] fields will apply + to each of them. + + Field [table] will be concatenated with "_" and + the asset type names (see https://cloud.google.com/asset-inventory/docs/supported-asset-types - for supported asset types) to construct per-asset-type table - names, in which all non-alphanumeric characters like "." and - "/" will be substituted by "*". Example: if field [table] is - "mytable" and snapshot results contain - "storage.googleapis.com/Bucket" assets, the corresponding - table name will be "mytable_storage_googleapis_com_Bucket". - If any of these tables does not exist, a new table with the - concatenated name will be created. - - When [content_type] in the ExportAssetsRequest is - ``RESOURCE``, the schema of each table will include - RECORD-type columns mapped to the nested fields in the - Asset.resource.data field of that asset type (up to the 15 - nested level BigQuery supports + for supported asset types) to construct + per-asset-type table names, in which all + non-alphanumeric characters like "." and "/" + will be substituted by "_". Example: if field + [table] is "mytable" and snapshot results + contain "storage.googleapis.com/Bucket" assets, + the corresponding table name will be + "mytable_storage_googleapis_com_Bucket". If any + of these tables does not exist, a new table with + the concatenated name will be created. + + When [content_type] in the ExportAssetsRequest + is `RESOURCE`, the schema of each table will + include RECORD-type columns mapped to the nested + fields in the Asset.resource.data field of that + asset type (up to the 15 nested level BigQuery + supports (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). - The fields in >15 nested levels will be stored in JSON - format string as a child column of its parent RECORD column. - - If error occurs when exporting to any table, the whole - export call will return an error but the export results that - already succeed will persist. Example: if exporting to - table_type_A succeeds when exporting to table_type_B fails - during one export call, the results in table_type_A will - persist and there will not be partial results persisting in - a table. + The fields in >15 nested levels will be stored + in JSON format string as a child column of its + parent RECORD column. + + If error occurs when exporting to any table, the + whole export call will return an error but the + export results that already succeed will + persist. Example: if exporting to table_type_A + succeeds when exporting to table_type_B fails + during one export call, the results in + table_type_A will persist and there will not be + partial results persisting in a table. """ dataset: str = proto.Field( @@ -886,9 +945,9 @@ class PartitionSpec(proto.Message): """ class PartitionKey(proto.Enum): r"""This enum is used to determine the partition key column when - exporting assets to BigQuery partitioned table(s). Note that, if the - partition key is a timestamp column, the actual partition is based - on its date value (expressed in UTC. see details in + exporting assets to BigQuery partitioned table(s). Note that, if + the partition key is a timestamp column, the actual partition is + based on its date value (expressed in UTC. see details in https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables). Values: @@ -896,12 +955,14 @@ class PartitionKey(proto.Enum): Unspecified partition key. If used, it means using non-partitioned table. READ_TIME (1): - The time when the snapshot is taken. If specified as - partition key, the result table(s) is partitoned by the - additional timestamp column, readTime. If [read_time] in - ExportAssetsRequest is specified, the readTime column's - value will be the same as it. Otherwise, its value will be - the current time that is used to take the snapshot. + The time when the snapshot is taken. If + specified as partition key, the result table(s) + is partitoned by the additional timestamp + column, readTime. If [read_time] in + ExportAssetsRequest is specified, the readTime + column's value will be the same as it. + Otherwise, its value will be the current time + that is used to take the snapshot. REQUEST_TIME (2): The time when the request is received and started to be processed. If specified as @@ -926,8 +987,8 @@ class PubsubDestination(proto.Message): Attributes: topic (str): - The name of the Pub/Sub topic to publish to. Example: - ``projects/PROJECT_ID/topics/TOPIC_ID``. + The name of the Pub/Sub topic to publish to. + Example: `projects/PROJECT_ID/topics/TOPIC_ID`. """ topic: str = proto.Field( @@ -973,28 +1034,31 @@ class Feed(proto.Message): or organizations/{organization_number}/feeds/{client-assigned_feed_identifier} - The client-assigned feed identifier must be unique within - the parent project/folder/organization. + The client-assigned feed identifier must be + unique within the parent + project/folder/organization. asset_names (MutableSequence[str]): - A list of the full names of the assets to receive updates. - You must specify either or both of asset_names and - asset_types. Only asset updates matching specified - asset_names or asset_types are exported to the feed. - Example: - ``//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1``. - For a list of the full names for supported asset types, see - `Resource name - format `__. + A list of the full names of the assets to + receive updates. You must specify either or both + of asset_names and asset_types. Only asset + updates matching specified asset_names or + asset_types are exported to the feed. Example: + + `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + For a list of the full names for supported asset + types, see [Resource name + format](/asset-inventory/docs/resource-name-format). asset_types (MutableSequence[str]): - A list of types of the assets to receive updates. You must - specify either or both of asset_names and asset_types. Only - asset updates matching specified asset_names or asset_types + A list of types of the assets to receive + updates. You must specify either or both of + asset_names and asset_types. Only asset updates + matching specified asset_names or asset_types are exported to the feed. Example: - ``"compute.googleapis.com/Disk"`` + `"compute.googleapis.com/Disk"` - For a list of all supported asset types, see `Supported - asset - types `__. + For a list of all supported asset types, see + [Supported asset + types](/asset-inventory/docs/supported-asset-types). content_type (google.cloud.asset_v1.types.ContentType): Asset content type. If not specified, no content but the asset name and type will be @@ -1003,37 +1067,46 @@ class Feed(proto.Message): Required. Feed output configuration defining where the asset updates are published to. condition (google.type.expr_pb2.Expr): - A condition which determines whether an asset update should - be published. If specified, an asset will be returned only - when the expression evaluates to true. When set, - ``expression`` field in the ``Expr`` must be a valid [CEL - expression] (https://github.com/google/cel-spec) on a - TemporalAsset with name ``temporal_asset``. Example: a Feed - with expression ("temporal_asset.deleted == true") will only - publish Asset deletions. Other fields of ``Expr`` are - optional. - - See our `user - guide `__ + A condition which determines whether an asset + update should be published. If specified, an + asset will be returned only when the expression + evaluates to true. + When set, `expression` field in the `Expr` must + be a valid [CEL expression] + (https://github.com/google/cel-spec) on a + TemporalAsset with name `temporal_asset`. + Example: a Feed with expression + ("temporal_asset.deleted == true") will only + publish Asset deletions. Other fields of `Expr` + are optional. + + See our [user + guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition) for detailed instructions. relationship_types (MutableSequence[str]): - A list of relationship types to output, for example: - ``INSTANCE_TO_INSTANCEGROUP``. This field should only be - specified if content_type=RELATIONSHIP. - - - If specified: it outputs specified relationship updates on - the [asset_names] or the [asset_types]. It returns an - error if any of the [relationship_types] doesn't belong to - the supported relationship types of the [asset_names] or - [asset_types], or any of the [asset_names] or the - [asset_types] doesn't belong to the source types of the - [relationship_types]. - - Otherwise: it outputs the supported relationships of the - types of [asset_names] and [asset_types] or returns an - error if any of the [asset_names] or the [asset_types] has - no replationship support. See `Introduction to Cloud Asset - Inventory `__ - for all supported asset types and relationship types. + A list of relationship types to output, for + example: `INSTANCE_TO_INSTANCEGROUP`. This field + should only be specified if + content_type=RELATIONSHIP. + * If specified: + + it outputs specified relationship updates on the + [asset_names] or the [asset_types]. It returns + an error if any of the [relationship_types] + doesn't belong to the supported relationship + types of the [asset_names] or [asset_types], or + any of the [asset_names] or the [asset_types] + doesn't belong to the source types of the + [relationship_types]. * Otherwise: + + it outputs the supported relationships of the + types of [asset_names] and [asset_types] or + returns an error if any of the [asset_names] or + the [asset_types] has no replationship support. + See [Introduction to Cloud Asset + Inventory](https://cloud.google.com/asset-inventory/docs/overview) + for all supported asset types and relationship + types. """ name: str = proto.Field( @@ -1074,171 +1147,197 @@ class SearchAllResourcesRequest(proto.Message): Attributes: scope (str): - Required. A scope can be a project, a folder, or an - organization. The search is limited to the resources within - the ``scope``. The caller must be granted the - ```cloudasset.assets.searchAllResources`` `__ + Required. A scope can be a project, a folder, + or an organization. The search is limited to the + resources within the `scope`. The caller must be + granted the + [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) permission on the desired scope. The allowed values are: - - projects/{PROJECT_ID} (e.g., "projects/foo-bar") - - projects/{PROJECT_NUMBER} (e.g., "projects/12345678") - - folders/{FOLDER_NUMBER} (e.g., "folders/1234567") - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * projects/{PROJECT_ID} (e.g., + "projects/foo-bar") * projects/{PROJECT_NUMBER} + (e.g., "projects/12345678") * + folders/{FOLDER_NUMBER} (e.g., + "folders/1234567") * + organizations/{ORGANIZATION_NUMBER} (e.g., + "organizations/123456") query (str): - Optional. The query statement. See `how to construct a - query `__ - for more information. If not specified or empty, it will - search all the resources within the specified ``scope``. + Optional. The query statement. See [how to + construct a + query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + for more information. If not specified or empty, + it will search all the resources within the + specified `scope`. Examples: - - ``name:Important`` to find Google Cloud resources whose - name contains "Important" as a word. - - ``name=Important`` to find the Google Cloud resource whose - name is exactly "Important". - - ``displayName:Impor*`` to find Google Cloud resources - whose display name contains "Impor" as a prefix of any - word in the field. - - ``location:us-west*`` to find Google Cloud resources whose - location contains both "us" and "west" as prefixes. - - ``labels:prod`` to find Google Cloud resources whose - labels contain "prod" as a key or value. - - ``labels.env:prod`` to find Google Cloud resources that - have a label "env" and its value is "prod". - - ``labels.env:*`` to find Google Cloud resources that have - a label "env". - - ``kmsKey:key`` to find Google Cloud resources encrypted - with a customer-managed encryption key whose name contains - "key" as a word. This field is deprecated. Please use the - ``kmsKeys`` field to retrieve Cloud KMS key information. - - ``kmsKeys:key`` to find Google Cloud resources encrypted - with customer-managed encryption keys whose name contains - the word "key". - - ``relationships:instance-group-1`` to find Google Cloud - resources that have relationships with "instance-group-1" - in the related resource name. - - ``relationships:INSTANCE_TO_INSTANCEGROUP`` to find - Compute Engine instances that have relationships of type - "INSTANCE_TO_INSTANCEGROUP". - - ``relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1`` - to find Compute Engine instances that have relationships - with "instance-group-1" in the Compute Engine instance - group resource name, for relationship type - "INSTANCE_TO_INSTANCEGROUP". - - ``state:ACTIVE`` to find Google Cloud resources whose - state contains "ACTIVE" as a word. - - ``NOT state:ACTIVE`` to find Google Cloud resources whose - state doesn't contain "ACTIVE" as a word. - - ``createTime<1609459200`` to find Google Cloud resources - that were created before "2021-01-01 00:00:00 UTC". - 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 - UTC" in seconds. - - ``updateTime>1609459200`` to find Google Cloud resources - that were updated after "2021-01-01 00:00:00 UTC". - 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 - UTC" in seconds. - - ``Important`` to find Google Cloud resources that contain - "Important" as a word in any of the searchable fields. - - ``Impor*`` to find Google Cloud resources that contain - "Impor" as a prefix of any word in any of the searchable - fields. - - ``Important location:(us-west1 OR global)`` to find Google - Cloud resources that contain "Important" as a word in any - of the searchable fields and are also located in the - "us-west1" region or the "global" location. + * `name:Important` to find Google Cloud + resources whose name contains "Important" as a + word. + * `name=Important` to find the Google Cloud + resource whose name is exactly "Important". + * `displayName:Impor*` to find Google Cloud + resources whose display name contains "Impor" + as a prefix of any word in the field. * + `location:us-west*` to find Google Cloud + resources whose location contains both "us" + and "west" as prefixes. + * `labels:prod` to find Google Cloud resources + whose labels contain "prod" as a key or value. + * `labels.env:prod` to find Google Cloud + resources that have a label "env" and its + value is "prod". + * `labels.env:*` to find Google Cloud resources + that have a label "env". * `kmsKey:key` to find + Google Cloud resources encrypted with a + customer-managed encryption key whose name + contains "key" as a word. This field is + deprecated. Please use the `kmsKeys` field to + retrieve Cloud KMS key information. + * `kmsKeys:key` to find Google Cloud resources + encrypted with customer-managed encryption + keys whose name contains the word "key". * + `relationships:instance-group-1` to find Google + Cloud resources that have relationships with + "instance-group-1" in the related resource name. + * `relationships:INSTANCE_TO_INSTANCEGROUP` to + find Compute Engine instances that have + relationships of type + "INSTANCE_TO_INSTANCEGROUP". * + `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` + to find Compute Engine instances that have + relationships with "instance-group-1" in the + Compute Engine instance group resource name, for + relationship type "INSTANCE_TO_INSTANCEGROUP". + * `state:ACTIVE` to find Google Cloud resources + whose state contains "ACTIVE" as a word. + * `NOT state:ACTIVE` to find Google Cloud + resources whose state doesn't contain "ACTIVE" + as a word. + * `createTime<1609459200` to find Google Cloud + resources that were created before "2021-01-01 + 00:00:00 UTC". 1609459200 is the epoch timestamp + of "2021-01-01 00:00:00 UTC" in seconds. + * `updateTime>1609459200` to find Google Cloud + resources that were updated after "2021-01-01 + 00:00:00 UTC". 1609459200 is the epoch timestamp + of "2021-01-01 00:00:00 UTC" in seconds. + * `Important` to find Google Cloud resources + that contain "Important" as a word in any of + the searchable fields. + * `Impor*` to find Google Cloud resources that + contain "Impor" as a prefix of any word in any + of the searchable fields. * `Important + location:(us-west1 OR global)` to find Google + Cloud resources that contain "Important" as a + word in any of the searchable fields and are + also located in the "us-west1" region or the + "global" location. asset_types (MutableSequence[str]): - Optional. A list of asset types that this request searches - for. If empty, it will search all the `searchable asset - types `__. - - Regular expressions are also supported. For example: - - - "compute.googleapis.com.\*" snapshots resources whose - asset type starts with "compute.googleapis.com". - - ".*Instance" snapshots resources whose asset type ends - with "Instance". - - ".\ *Instance.*" snapshots resources whose asset type - contains "Instance". - - See `RE2 `__ for - all supported regular expression syntax. If the regular - expression does not match any supported asset type, an - INVALID_ARGUMENT error will be returned. + Optional. A list of asset types that this + request searches for. If empty, it will search + all the [searchable asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + + Regular expressions are also supported. For + example: + + * "compute.googleapis.com.*" snapshots resources + whose asset type starts with + "compute.googleapis.com". + * ".*Instance" snapshots resources whose asset + type ends with "Instance". * ".*Instance.*" + snapshots resources whose asset type contains + "Instance". + + See + [RE2](https://github.com/google/re2/wiki/Syntax) + for all supported regular expression syntax. If + the regular expression does not match any + supported asset type, an INVALID_ARGUMENT error + will be returned. page_size (int): - Optional. The page size for search result pagination. Page - size is capped at 500 even if a larger value is given. If - set to zero, server will pick an appropriate default. - Returned results may be fewer than requested. When this + Optional. The page size for search result + pagination. Page size is capped at 500 even if a + larger value is given. If set to zero, server + will pick an appropriate default. Returned + results may be fewer than requested. When this happens, there could be more results as long as - ``next_page_token`` is returned. + `next_page_token` is returned. page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``page_token`` must be the value of ``next_page_token`` from - the previous response. The values of all other method - parameters, must be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `page_token` must be the value of + `next_page_token` from the previous response. + The values of all other method parameters, must + be identical to those in the previous call. order_by (str): - Optional. A comma-separated list of fields specifying the - sorting order of the results. The default order is - ascending. Add " DESC" after the field name to indicate - descending order. Redundant space characters are ignored. - Example: "location DESC, name". Only singular primitive - fields in the response are sortable: - - - name - - assetType - - project - - displayName - - description - - location - - createTime - - updateTime - - state - - parentFullResourceName - - parentAssetType - - All the other fields such as repeated fields (e.g., - ``networkTags``, ``kmsKeys``), map fields (e.g., ``labels``) - and struct fields (e.g., ``additionalAttributes``) are not - supported. + Optional. A comma-separated list of fields + specifying the sorting order of the results. The + default order is ascending. Add " DESC" after + the field name to indicate descending order. + Redundant space characters are ignored. Example: + "location DESC, name". + Only singular primitive fields in the response + are sortable: + + * name + * assetType + * project + * displayName + * description + * location + * createTime + * updateTime + * state + * parentFullResourceName + * parentAssetType + + All the other fields such as repeated fields + (e.g., `networkTags`, `kmsKeys`), map fields + (e.g., `labels`) and struct fields (e.g., + `additionalAttributes`) are not supported. read_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. A comma-separated list of fields specifying which - fields to be returned in ResourceSearchResult. Only '\*' or - combination of top level fields can be specified. Field - names of both snake_case and camelCase are supported. - Examples: ``"*"``, ``"name,location"``, - ``"name,versionedResources"``. - - The read_mask paths must be valid field paths listed but not - limited to (both snake_case and camelCase are supported): - - - name - - assetType - - project - - displayName - - description - - location - - tagKeys - - tagValues - - tagValueIds - - labels - - networkTags - - kmsKey (This field is deprecated. Please use the - ``kmsKeys`` field to retrieve Cloud KMS key information.) - - kmsKeys - - createTime - - updateTime - - state - - additionalAttributes - - versionedResources + Optional. A comma-separated list of fields + specifying which fields to be returned in + ResourceSearchResult. Only '*' or combination of + top level fields can be specified. Field names + of both snake_case and camelCase are supported. + Examples: `"*"`, `"name,location"`, + `"name,versionedResources"`. + + The read_mask paths must be valid field paths + listed but not limited to (both snake_case and + camelCase are supported): + + * name + * assetType + * project + * displayName + * description + * location + * tagKeys + * tagValues + * tagValueIds + * labels + * networkTags + * kmsKey (This field is deprecated. Please use + the `kmsKeys` field to retrieve Cloud KMS + key information.) + * kmsKeys + * createTime + * updateTime + * state + * additionalAttributes + * versionedResources If read_mask is not specified, all fields except - versionedResources will be returned. If only '\*' is - specified, all fields including versionedResources will be - returned. Any invalid field path will trigger + versionedResources will be returned. + If only '*' is specified, all fields including + versionedResources will be returned. + Any invalid field path will trigger INVALID_ARGUMENT error. """ @@ -1282,10 +1381,11 @@ class SearchAllResourcesResponse(proto.Message): query. It contains the resource standard metadata information. next_page_token (str): - If there are more results than those appearing in this - response, then ``next_page_token`` is included. To get the - next set of results, call this method again using the value - of ``next_page_token`` as ``page_token``. + If there are more results than those + appearing in this response, then + `next_page_token` is included. To get the next + set of results, call this method again using the + value of `next_page_token` as `page_token`. """ @property @@ -1308,112 +1408,135 @@ class SearchAllIamPoliciesRequest(proto.Message): Attributes: scope (str): - Required. A scope can be a project, a folder, or an - organization. The search is limited to the IAM policies - within the ``scope``. The caller must be granted the - ```cloudasset.assets.searchAllIamPolicies`` `__ + Required. A scope can be a project, a folder, + or an organization. The search is limited to the + IAM policies within the `scope`. The caller must + be granted the + [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) permission on the desired scope. The allowed values are: - - projects/{PROJECT_ID} (e.g., "projects/foo-bar") - - projects/{PROJECT_NUMBER} (e.g., "projects/12345678") - - folders/{FOLDER_NUMBER} (e.g., "folders/1234567") - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * projects/{PROJECT_ID} (e.g., + "projects/foo-bar") * projects/{PROJECT_NUMBER} + (e.g., "projects/12345678") * + folders/{FOLDER_NUMBER} (e.g., + "folders/1234567") * + organizations/{ORGANIZATION_NUMBER} (e.g., + "organizations/123456") query (str): - Optional. The query statement. See `how to construct a - query `__ - for more information. If not specified or empty, it will - search all the IAM policies within the specified ``scope``. - Note that the query string is compared against each IAM - policy binding, including its principals, roles, and IAM - conditions. The returned IAM policies will only contain the - bindings that match your query. To learn more about the IAM - policy structure, see the `IAM policy - documentation `__. + Optional. The query statement. See [how to + construct a + query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) + for more information. If not specified or empty, + it will search all the IAM policies within the + specified `scope`. Note that the query string is + compared against each IAM policy binding, + including its principals, roles, and IAM + conditions. The returned IAM policies will only + contain the bindings that match your query. To + learn more about the IAM policy structure, see + the [IAM policy + documentation](https://cloud.google.com/iam/help/allow-policies/structure). Examples: - - ``policy:amy@gmail.com`` to find IAM policy bindings that - specify user "amy@gmail.com". - - ``policy:roles/compute.admin`` to find IAM policy bindings - that specify the Compute Admin role. - - ``policy:comp*`` to find IAM policy bindings that contain - "comp" as a prefix of any word in the binding. - - ``policy.role.permissions:storage.buckets.update`` to find - IAM policy bindings that specify a role containing - "storage.buckets.update" permission. Note that if callers - don't have ``iam.roles.get`` access to a role's included - permissions, policy bindings that specify this role will - be dropped from the search results. - - ``policy.role.permissions:upd*`` to find IAM policy - bindings that specify a role containing "upd" as a prefix - of any word in the role permission. Note that if callers - don't have ``iam.roles.get`` access to a role's included - permissions, policy bindings that specify this role will - be dropped from the search results. - - ``resource:organizations/123456`` to find IAM policy - bindings that are set on "organizations/123456". - - ``resource=//cloudresourcemanager.googleapis.com/projects/myproject`` - to find IAM policy bindings that are set on the project - named "myproject". - - ``Important`` to find IAM policy bindings that contain - "Important" as a word in any of the searchable fields - (except for the included permissions). - - ``resource:(instance1 OR instance2) policy:amy`` to find - IAM policy bindings that are set on resources "instance1" - or "instance2" and also specify user "amy". - - ``roles:roles/compute.admin`` to find IAM policy bindings - that specify the Compute Admin role. - - ``memberTypes:user`` to find IAM policy bindings that - contain the principal type "user". + * `policy:amy@gmail.com` to find IAM policy + bindings that specify user "amy@gmail.com". + * `policy:roles/compute.admin` to find IAM + policy bindings that specify the Compute Admin + role. + * `policy:comp*` to find IAM policy bindings + that contain "comp" as a prefix of any word in + the binding. + * + `policy.role.permissions:storage.buckets.update` + to find IAM policy bindings that specify a + role containing "storage.buckets.update" + permission. Note that if callers don't have + `iam.roles.get` access to a role's included + permissions, policy bindings that specify this + role will be dropped from the search results. + * `policy.role.permissions:upd*` to find IAM + policy bindings that specify a role containing + "upd" as a prefix of any word in the role + permission. Note that if callers don't have + `iam.roles.get` access to a role's included + permissions, policy bindings that specify this + role will be dropped from the search results. + * `resource:organizations/123456` to find IAM + policy bindings that are set on + "organizations/123456". + * + `resource=//cloudresourcemanager.googleapis.com/projects/myproject` + to find IAM policy bindings that are set on + the project named "myproject". * `Important` to + find IAM policy bindings that contain + "Important" as a word in any of the searchable + fields (except for the included permissions). + * `resource:(instance1 OR instance2) policy:amy` + to find IAM policy bindings that are set on + resources "instance1" or "instance2" and also + specify user "amy". + * `roles:roles/compute.admin` to find IAM policy + bindings that specify the Compute Admin role. + * `memberTypes:user` to find IAM policy bindings + that contain the principal type "user". page_size (int): - Optional. The page size for search result pagination. Page - size is capped at 500 even if a larger value is given. If - set to zero, server will pick an appropriate default. - Returned results may be fewer than requested. When this + Optional. The page size for search result + pagination. Page size is capped at 500 even if a + larger value is given. If set to zero, server + will pick an appropriate default. Returned + results may be fewer than requested. When this happens, there could be more results as long as - ``next_page_token`` is returned. + `next_page_token` is returned. page_token (str): - Optional. If present, retrieve the next batch of results - from the preceding call to this method. ``page_token`` must - be the value of ``next_page_token`` from the previous - response. The values of all other method parameters must be - identical to those in the previous call. + Optional. If present, retrieve the next batch + of results from the preceding call to this + method. `page_token` must be the value of + `next_page_token` from the previous response. + The values of all other method parameters must + be identical to those in the previous call. asset_types (MutableSequence[str]): - Optional. A list of asset types that the IAM policies are - attached to. If empty, it will search the IAM policies that - are attached to all the `searchable asset - types `__. - - Regular expressions are also supported. For example: - - - "compute.googleapis.com.\*" snapshots IAM policies - attached to asset type starts with - "compute.googleapis.com". - - ".*Instance" snapshots IAM policies attached to asset type - ends with "Instance". - - ".\ *Instance.*" snapshots IAM policies attached to asset - type contains "Instance". - - See `RE2 `__ for - all supported regular expression syntax. If the regular - expression does not match any supported asset type, an - INVALID_ARGUMENT error will be returned. + Optional. A list of asset types that the IAM + policies are attached to. If empty, it will + search the IAM policies that are attached to all + the [searchable asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + + Regular expressions are also supported. For + example: + + * "compute.googleapis.com.*" snapshots IAM + policies attached to asset type starts with + "compute.googleapis.com". + * ".*Instance" snapshots IAM policies attached + to asset type ends with "Instance". + * ".*Instance.*" snapshots IAM policies attached + to asset type contains "Instance". + + See + [RE2](https://github.com/google/re2/wiki/Syntax) + for all supported regular expression syntax. If + the regular expression does not match any + supported asset type, an INVALID_ARGUMENT error + will be returned. order_by (str): - Optional. A comma-separated list of fields specifying the - sorting order of the results. The default order is - ascending. Add " DESC" after the field name to indicate - descending order. Redundant space characters are ignored. - Example: "assetType DESC, resource". Only singular primitive - fields in the response are sortable: - - - resource - - assetType - - project All the other fields such as repeated fields - (e.g., ``folders``) and non-primitive fields (e.g., - ``policy``) are not supported. + Optional. A comma-separated list of fields + specifying the sorting order of the results. The + default order is ascending. Add " DESC" after + the field name to indicate descending order. + Redundant space characters are ignored. Example: + "assetType DESC, resource". + Only singular primitive fields in the response + are sortable: + + * resource + * assetType + * project + All the other fields such as repeated fields + (e.g., `folders`) and non-primitive fields + (e.g., `policy`) are not supported. """ scope: str = proto.Field( @@ -1452,9 +1575,10 @@ class SearchAllIamPoliciesResponse(proto.Message): associated resource is returned along with the policy. next_page_token (str): - Set if there are more results than those appearing in this - response; to get the next set of results, call this method - again, using this value as the ``page_token``. + Set if there are more results than those + appearing in this response; to get the next set + of results, call this method again, using this + value as the `page_token`. """ @property @@ -1477,21 +1601,22 @@ class IamPolicyAnalysisQuery(proto.Message): Attributes: scope (str): - Required. The relative name of the root asset. Only - resources and IAM policies within the scope will be - analyzed. + Required. The relative name of the root + asset. Only resources and IAM policies within + the scope will be analyzed. This can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as - "projects/my-project-id"), or a project number (such as - "projects/12345"). + "projects/my-project-id"), or a project number + (such as "projects/12345"). - To know how to get organization id, visit - `here `__. + To know how to get organization id, visit [here + ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). To know how to get folder or project id, visit - `here `__. + [here + ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). resource_selector (google.cloud.asset_v1.types.IamPolicyAnalysisQuery.ResourceSelector): Optional. Specifies a resource for analysis. identity_selector (google.cloud.asset_v1.types.IamPolicyAnalysisQuery.IdentitySelector): @@ -1515,8 +1640,8 @@ class ResourceSelector(proto.Message): full_resource_name (str): Required. The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) - of a resource of `supported resource - types `__. + of a resource of [supported resource + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). """ full_resource_name: str = proto.Field( @@ -1531,17 +1656,20 @@ class IdentitySelector(proto.Message): Attributes: identity (str): - Required. The identity appear in the form of principals in - `IAM policy - binding `__. + Required. The identity appear in the form of + principals in [IAM policy + binding](https://cloud.google.com/iam/reference/rest/v1/Binding). The examples of supported forms are: - "user:mike@example.com", "group:admins@example.com", + + "user:mike@example.com", + "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com". - Notice that wildcard characters (such as \* and ?) are not - supported. You must give a specific identity. + Notice that wildcard characters (such as * and + ?) are not supported. You must give a specific + identity. """ identity: str = proto.Field( @@ -1578,57 +1706,64 @@ class Options(proto.Message): Attributes: expand_groups (bool): - Optional. If true, the identities section of the result will - expand any Google groups appearing in an IAM policy binding. + Optional. If true, the identities section of + the result will expand any Google groups + appearing in an IAM policy binding. If [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector] - is specified, the identity in the result will be determined - by the selector, and this flag is not allowed to set. + is specified, the identity in the result will be + determined by the selector, and this flag is not + allowed to set. - If true, the default max expansion per group is 1000 for - AssetService.AnalyzeIamPolicy][]. + If true, the default max expansion per group is + 1000 for AssetService.AnalyzeIamPolicy][]. Default is false. expand_roles (bool): - Optional. If true, the access section of result will expand - any roles appearing in IAM policy bindings to include their - permissions. + Optional. If true, the access section of + result will expand any roles appearing in IAM + policy bindings to include their permissions. If [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector] - is specified, the access section of the result will be - determined by the selector, and this flag is not allowed to - set. + is specified, the access section of the result + will be determined by the selector, and this + flag is not allowed to set. Default is false. expand_resources (bool): Optional. If true and [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] - is not specified, the resource section of the result will - expand any resource attached to an IAM policy to include - resources lower in the resource hierarchy. + is not specified, the resource section of the + result will expand any resource attached to an + IAM policy to include resources lower in the + resource hierarchy. - For example, if the request analyzes for which resources - user A has permission P, and the results include an IAM - policy with P on a Google Cloud folder, the results will - also include resources in that folder with permission P. + For example, if the request analyzes for which + resources user A has permission P, and the + results include an IAM policy with P on a Google + Cloud folder, the results will also include + resources in that folder with permission P. If true and [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] - is specified, the resource section of the result will expand - the specified resource to include resources lower in the - resource hierarchy. Only project or lower resources are - supported. Folder and organization resources cannot be used + is specified, the resource section of the result + will expand the specified resource to include + resources lower in the resource hierarchy. Only + project or lower resources are supported. Folder + and organization resources cannot be used together with this option. - For example, if the request analyzes for which users have - permission P on a Google Cloud project with this option - enabled, the results will include all users who have - permission P on that project or any lower resource. + For example, if the request analyzes for which + users have permission P on a Google Cloud + project with this option enabled, the results + will include all users who have permission P on + that project or any lower resource. - If true, the default max expansion per resource is 1000 for - AssetService.AnalyzeIamPolicy][] and 100000 for + If true, the default max expansion per resource + is 1000 for AssetService.AnalyzeIamPolicy][] and + 100000 for AssetService.AnalyzeIamPolicyLongrunning][]. Default is false. @@ -1642,43 +1777,48 @@ class Options(proto.Message): and other groups, and between groups and principals. Default is false. analyze_service_account_impersonation (bool): - Optional. If true, the response will include access analysis - from identities to resources via service account - impersonation. This is a very expensive operation, because - many derived queries will be executed. We highly recommend + Optional. If true, the response will include + access analysis from identities to resources via + service account impersonation. This is a very + expensive operation, because many derived + queries will be executed. We highly recommend you use [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] RPC instead. - For example, if the request analyzes for which resources - user A has permission P, and there's an IAM policy states - user A has iam.serviceAccounts.getAccessToken permission to - a service account SA, and there's another IAM policy states - service account SA has permission P to a Google Cloud folder - F, then user A potentially has access to the Google Cloud - folder F. And those advanced analysis results will be - included in + For example, if the request analyzes for which + resources user A has permission P, and there's + an IAM policy states user A has + iam.serviceAccounts.getAccessToken permission to + a service account SA, and there's another IAM + policy states service account SA has permission + P to a Google Cloud folder F, then user A + potentially has access to the Google Cloud + folder F. And those advanced analysis results + will be included in [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. - Another example, if the request analyzes for who has - permission P to a Google Cloud folder F, and there's an IAM - policy states user A has iam.serviceAccounts.actAs - permission to a service account SA, and there's another IAM - policy states service account SA has permission P to the - Google Cloud folder F, then user A potentially has access to - the Google Cloud folder F. And those advanced analysis - results will be included in + Another example, if the request analyzes for who + has permission P to a Google Cloud folder F, and + there's an IAM policy states user A has + iam.serviceAccounts.actAs permission to a + service account SA, and there's another IAM + policy states service account SA has permission + P to the Google Cloud folder F, then user A + potentially has access to the Google Cloud + folder F. And those advanced analysis results + will be included in [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. - Only the following permissions are considered in this - analysis: + Only the following permissions are considered in + this analysis: - - ``iam.serviceAccounts.actAs`` - - ``iam.serviceAccounts.signBlob`` - - ``iam.serviceAccounts.signJwt`` - - ``iam.serviceAccounts.getAccessToken`` - - ``iam.serviceAccounts.getOpenIdToken`` - - ``iam.serviceAccounts.implicitDelegation`` + * `iam.serviceAccounts.actAs` + * `iam.serviceAccounts.signBlob` + * `iam.serviceAccounts.signJwt` + * `iam.serviceAccounts.getAccessToken` + * `iam.serviceAccounts.getOpenIdToken` + * `iam.serviceAccounts.implicitDelegation` Default is false. """ @@ -1715,10 +1855,10 @@ class ConditionContext(proto.Message): Attributes: access_time (google.protobuf.timestamp_pb2.Timestamp): - The hypothetical access timestamp to evaluate IAM - conditions. Note that this value must not be earlier than - the current time; otherwise, an INVALID_ARGUMENT error will - be returned. + The hypothetical access timestamp to evaluate + IAM conditions. Note that this value must not be + earlier than the current time; otherwise, an + INVALID_ARGUMENT error will be returned. This field is a member of `oneof`_ ``TimeContext``. """ @@ -1769,35 +1909,41 @@ class AnalyzeIamPolicyRequest(proto.Message): analysis_query (google.cloud.asset_v1.types.IamPolicyAnalysisQuery): Required. The request query. saved_analysis_query (str): - Optional. The name of a saved query, which must be in the - format of: - - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id - - If both ``analysis_query`` and ``saved_analysis_query`` are - provided, they will be merged together with the - ``saved_analysis_query`` as base and the ``analysis_query`` - as overrides. For more details of the merge behavior, please - refer to the - `MergeFrom `__ + Optional. The name of a saved query, which + must be in the format of: + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id + + If both `analysis_query` and + `saved_analysis_query` are provided, they will + be merged together with the + `saved_analysis_query` as base and the + `analysis_query` as overrides. For more details + of the merge behavior, please refer to the + [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) page. - Note that you cannot override primitive fields with default - value, such as 0 or empty string, etc., because we use - proto3, which doesn't support field presence yet. + Note that you cannot override primitive fields + with default value, such as 0 or empty string, + etc., because we use proto3, which doesn't + support field presence yet. execution_timeout (google.protobuf.duration_pb2.Duration): - Optional. Amount of time executable has to complete. See - JSON representation of - `Duration `__. - - If this field is set with a value less than the RPC - deadline, and the execution of your query hasn't finished in - the specified execution timeout, you will get a response - with partial result. Otherwise, your query's execution will - continue until the RPC deadline. If it's not finished until - then, you will get a DEADLINE_EXCEEDED error. + Optional. Amount of time executable has to + complete. See JSON representation of + [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). + + If this field is set with a value less than the + RPC deadline, and the execution of your query + hasn't finished in the specified execution + timeout, you will get a response with partial + result. Otherwise, your query's execution will + continue until the RPC deadline. If it's not + finished until then, you will get a + DEADLINE_EXCEEDED error. Default is empty. """ @@ -1835,7 +1981,8 @@ class AnalyzeIamPolicyResponse(proto.Message): [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis] and [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis] - have been fully explored to answer the query in the request. + have been fully explored to answer the query in + the request. """ class IamPolicyAnalysis(proto.Message): @@ -1847,8 +1994,8 @@ class IamPolicyAnalysis(proto.Message): analysis_results (MutableSequence[google.cloud.asset_v1.types.IamPolicyAnalysisResult]): A list of [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult] - that matches the analysis query, or empty if no result is - found. + that matches the analysis query, or empty if no + result is found. fully_explored (bool): Represents whether all entries in the [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results] @@ -1921,16 +2068,16 @@ class GcsDestination(proto.Message): Attributes: uri (str): - Required. The URI of the Cloud Storage object. It's the same - URI that is used by gsutil. Example: - "gs://bucket_name/object_name". See `Viewing and Editing - Object - Metadata `__ + Required. The URI of the Cloud Storage + object. It's the same URI that is used by + gsutil. Example: "gs://bucket_name/object_name". + See [Viewing and Editing Object + Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) for more information. - If the specified Cloud Storage object already exists and - there is no - `hold `__, + If the specified Cloud Storage object already + exists and there is no + [hold](https://cloud.google.com/storage/docs/object-holds), it will be overwritten with the analysis result. """ @@ -1945,41 +2092,44 @@ class BigQueryDestination(proto.Message): Attributes: dataset (str): Required. The BigQuery dataset in format - "projects/projectId/datasets/datasetId", to which the - analysis results should be exported. If this dataset does - not exist, the export call will return an INVALID_ARGUMENT - error. + "projects/projectId/datasets/datasetId", to + which the analysis results should be exported. + If this dataset does not exist, the export call + will return an INVALID_ARGUMENT error. table_prefix (str): - Required. The prefix of the BigQuery tables to which the - analysis results will be written. Tables will be created - based on this table_prefix if not exist: - - - _analysis table will contain export - operation's metadata. - - _analysis_result will contain all the - [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]. - When [partition_key] is specified, both tables will be - partitioned based on the [partition_key]. + Required. The prefix of the BigQuery tables + to which the analysis results will be written. + Tables will be created based on this + table_prefix if not exist: + + * _analysis table will contain + export operation's metadata. * + _analysis_result will contain all + the + [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]. + When [partition_key] is specified, both tables + will be partitioned based on the + [partition_key]. partition_key (google.cloud.asset_v1.types.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey): The partition key for BigQuery partitioned table. write_disposition (str): - Optional. Specifies the action that occurs if the - destination table or partition already exists. The following - values are supported: - - - WRITE_TRUNCATE: If the table or partition already exists, - BigQuery overwrites the entire table or all the partitions - data. - - WRITE_APPEND: If the table or partition already exists, - BigQuery appends the data to the table or the latest - partition. - - WRITE_EMPTY: If the table already exists and contains - data, an error is returned. - - The default value is WRITE_APPEND. Each action is atomic and - only occurs if BigQuery is able to complete the job - successfully. Details are at + Optional. Specifies the action that occurs if + the destination table or partition already + exists. The following values are supported: + + * WRITE_TRUNCATE: If the table or partition + already exists, BigQuery overwrites the entire + table or all the partitions data. * + WRITE_APPEND: If the table or partition already + exists, BigQuery appends the data to the table + or the latest partition. * WRITE_EMPTY: If the + table already exists and contains data, an error + is returned. + + The default value is WRITE_APPEND. Each action + is atomic and only occurs if BigQuery is able to + complete the job successfully. Details are at https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file. """ class PartitionKey(proto.Enum): @@ -2043,24 +2193,28 @@ class AnalyzeIamPolicyLongrunningRequest(proto.Message): analysis_query (google.cloud.asset_v1.types.IamPolicyAnalysisQuery): Required. The request query. saved_analysis_query (str): - Optional. The name of a saved query, which must be in the - format of: - - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id - - If both ``analysis_query`` and ``saved_analysis_query`` are - provided, they will be merged together with the - ``saved_analysis_query`` as base and the ``analysis_query`` - as overrides. For more details of the merge behavior, please - refer to the - `MergeFrom `__ + Optional. The name of a saved query, which + must be in the format of: + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id + + If both `analysis_query` and + `saved_analysis_query` are provided, they will + be merged together with the + `saved_analysis_query` as base and the + `analysis_query` as overrides. For more details + of the merge behavior, please refer to the + [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) doc. - Note that you cannot override primitive fields with default - value, such as 0 or empty string, etc., because we use - proto3, which doesn't support field presence yet. + Note that you cannot override primitive fields + with default value, such as 0 or empty string, + etc., because we use proto3, which doesn't + support field presence yet. output_config (google.cloud.asset_v1.types.IamPolicyAnalysisOutputConfig): Required. Output configuration indicating where the results will be output to. @@ -2094,11 +2248,14 @@ class SavedQuery(proto.Message): Attributes: name (str): - The resource name of the saved query. The format must be: - - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id + The resource name of the saved query. The + format must be: + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id description (str): The description of this saved query. This value should be fewer than 255 characters. @@ -2130,7 +2287,8 @@ class QueryContent(proto.Message): Attributes: iam_policy_analysis_query (google.cloud.asset_v1.types.IamPolicyAnalysisQuery): - An IAM Policy Analysis query, which could be used in the + An IAM Policy Analysis query, which could be + used in the [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy] RPC or the [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] @@ -2189,27 +2347,30 @@ class CreateSavedQueryRequest(proto.Message): Attributes: parent (str): - Required. The name of the project/folder/organization where - this saved_query should be created in. It can only be an - organization number (such as "organizations/123"), a folder - number (such as "folders/123"), a project ID (such as - "projects/my-project-id"), or a project number (such as - "projects/12345"). + Required. The name of the + project/folder/organization where this + saved_query should be created in. It can only be + an organization number (such as + "organizations/123"), a folder number (such as + "folders/123"), a project ID (such as + "projects/my-project-id"), or a project number + (such as "projects/12345"). saved_query (google.cloud.asset_v1.types.SavedQuery): - Required. The saved_query details. The ``name`` field must - be empty as it will be generated based on the parent and - saved_query_id. + Required. The saved_query details. The `name` + field must be empty as it will be generated + based on the parent and saved_query_id. saved_query_id (str): - Required. The ID to use for the saved query, which must be - unique in the specified parent. It will become the final - component of the saved query's resource name. + Required. The ID to use for the saved query, + which must be unique in the specified parent. It + will become the final component of the saved + query's resource name. - This value should be 4-63 characters, and valid characters - are ``[a-z][0-9]-``. + This value should be 4-63 characters, and valid + characters are `[a-z][0-9]-`. - Notice that this field is required in the saved query - creation, and the ``name`` field of the ``saved_query`` will - be ignored. + Notice that this field is required in the saved + query creation, and the `name` field of the + `saved_query` will be ignored. """ parent: str = proto.Field( @@ -2232,12 +2393,14 @@ class GetSavedQueryRequest(proto.Message): Attributes: name (str): - Required. The name of the saved query and it must be in the - format of: - - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id + Required. The name of the saved query and it + must be in the format of: + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id """ name: str = proto.Field( @@ -2258,15 +2421,17 @@ class ListSavedQueriesRequest(proto.Message): "folders/12345")", or a project ID (such as "projects/my-project-id"). filter (str): - Optional. The expression to filter resources. The expression - is a list of zero or more restrictions combined via logical - operators ``AND`` and ``OR``. When ``AND`` and ``OR`` are - both used in the expression, parentheses must be - appropriately used to group the combinations. The expression - may also contain regular expressions. - - See https://google.aip.dev/160 for more information on the - grammar. + Optional. The expression to filter resources. + The expression is a list of zero or more + restrictions combined via logical operators + `AND` and `OR`. When `AND` and `OR` are both + used in the expression, parentheses must be + appropriately used to group the combinations. + The expression may also contain regular + expressions. + + See https://google.aip.dev/160 for more + information on the grammar. page_size (int): Optional. The maximum number of saved queries to return per page. The service may return fewer @@ -2274,13 +2439,13 @@ class ListSavedQueriesRequest(proto.Message): be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. page_token (str): - Optional. A page token, received from a previous - ``ListSavedQueries`` call. Provide this to retrieve the - subsequent page. + Optional. A page token, received from a + previous `ListSavedQueries` call. Provide this + to retrieve the subsequent page. - When paginating, all other parameters provided to - ``ListSavedQueries`` must match the call that provided the - page token. + When paginating, all other parameters provided + to `ListSavedQueries` must match the call that + provided the page token. """ parent: str = proto.Field( @@ -2308,9 +2473,9 @@ class ListSavedQueriesResponse(proto.Message): saved_queries (MutableSequence[google.cloud.asset_v1.types.SavedQuery]): A list of savedQueries. next_page_token (str): - A token, which can be sent as ``page_token`` to retrieve the - next page. If this field is omitted, there are no subsequent - pages. + A token, which can be sent as `page_token` to + retrieve the next page. If this field is + omitted, there are no subsequent pages. """ @property @@ -2335,12 +2500,16 @@ class UpdateSavedQueryRequest(proto.Message): saved_query (google.cloud.asset_v1.types.SavedQuery): Required. The saved query to update. - The saved query's ``name`` field is used to identify the one - to update, which has format as below: + The saved query's `name` field is used to + identify the one to update, which has format as + below: - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id update_mask (google.protobuf.field_mask_pb2.FieldMask): Required. The list of fields to update. """ @@ -2362,12 +2531,15 @@ class DeleteSavedQueryRequest(proto.Message): Attributes: name (str): - Required. The name of the saved query to delete. It must be - in the format of: - - - projects/project_number/savedQueries/saved_query_id - - folders/folder_number/savedQueries/saved_query_id - - organizations/organization_number/savedQueries/saved_query_id + Required. The name of the saved query to + delete. It must be in the format of: + + * + projects/project_number/savedQueries/saved_query_id + * + folders/folder_number/savedQueries/saved_query_id + * + organizations/organization_number/savedQueries/saved_query_id """ name: str = proto.Field( @@ -2562,18 +2734,18 @@ class BigQueryDestination(proto.Message): exist, a new table with the given name will be created. write_disposition (str): - Specifies the action that occurs if the destination table or - partition already exists. The following values are - supported: - - - WRITE_TRUNCATE: If the table or partition already exists, - BigQuery overwrites the entire table or all the partitions - data. - - WRITE_APPEND: If the table or partition already exists, - BigQuery appends the data to the table or the latest - partition. - - WRITE_EMPTY: If the table already exists and contains - data, a 'duplicate' error is returned in the job result. + Specifies the action that occurs if the + destination table or partition already exists. + The following values are supported: + + * WRITE_TRUNCATE: If the table or partition + already exists, BigQuery overwrites the entire + table or all the partitions data. * + WRITE_APPEND: If the table or partition already + exists, BigQuery appends the data to the table + or the latest partition. * WRITE_EMPTY: If the + table already exists and contains data, a + 'duplicate' error is returned in the job result. The default value is WRITE_EMPTY. """ @@ -2610,58 +2782,67 @@ class QueryAssetsRequest(proto.Message): Attributes: parent (str): - Required. The relative name of the root asset. This can only - be an organization number (such as "organizations/123"), a - project ID (such as "projects/my-project-id"), or a project - number (such as "projects/12345"), or a folder number (such - as "folders/123"). + Required. The relative name of the root + asset. This can only be an organization number + (such as "organizations/123"), a project ID + (such as "projects/my-project-id"), or a project + number (such as "projects/12345"), or a folder + number (such as "folders/123"). - Only assets belonging to the ``parent`` will be returned. + Only assets belonging to the `parent` will be + returned. statement (str): - Optional. A SQL statement that's compatible with `BigQuery - Standard - SQL `__. + Optional. A SQL statement that's compatible + with [BigQuery Standard + SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). This field is a member of `oneof`_ ``query``. job_reference (str): - Optional. Reference to the query job, which is from the - ``QueryAssetsResponse`` of previous ``QueryAssets`` call. + Optional. Reference to the query job, which + is from the `QueryAssetsResponse` of previous + `QueryAssets` call. This field is a member of `oneof`_ ``query``. page_size (int): - Optional. The maximum number of rows to return in the - results. Responses are limited to 10 MB and 1000 rows. + Optional. The maximum number of rows to + return in the results. Responses are limited to + 10 MB and 1000 rows. - By default, the maximum row count is 1000. When the byte or - row count limit is reached, the rest of the query results - will be paginated. + By default, the maximum row count is 1000. When + the byte or row count limit is reached, the rest + of the query results will be paginated. - The field will be ignored when [output_config] is specified. + The field will be ignored when [output_config] + is specified. page_token (str): Optional. A page token received from previous - ``QueryAssets``. - - The field will be ignored when [output_config] is specified. + `QueryAssets`. + The field will be ignored when [output_config] + is specified. timeout (google.protobuf.duration_pb2.Duration): - Optional. Specifies the maximum amount of time that the - client is willing to wait for the query to complete. By - default, this limit is 5 min for the first query, and 1 - minute for the following queries. If the query is complete, - the ``done`` field in the ``QueryAssetsResponse`` is true, - otherwise false. - - Like BigQuery `jobs.query - API `__ - The call is not guaranteed to wait for the specified - timeout; it typically returns after around 200 seconds - (200,000 milliseconds), even if the query is not complete. - - The field will be ignored when [output_config] is specified. + Optional. Specifies the maximum amount of + time that the client is willing to wait for the + query to complete. By default, this limit is 5 + min for the first query, and 1 minute for the + following queries. If the query is complete, the + `done` field in the `QueryAssetsResponse` is + true, otherwise false. + + Like BigQuery [jobs.query + API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest) + The call is not guaranteed to wait for the + specified timeout; it typically returns after + around 200 seconds (200,000 milliseconds), even + if the query is not complete. + + The field will be ignored when [output_config] + is specified. read_time_window (google.cloud.asset_v1.types.TimeWindow): - Optional. [start_time] is required. [start_time] must be - less than [end_time] Defaults [end_time] to now if - [start_time] is set and [end_time] isn't. Maximum permitted - time range is 7 days. + Optional. [start_time] is required. + [start_time] must be less than [end_time] + Defaults [end_time] to now if [start_time] is + set and [end_time] isn't. Maximum permitted time + range is 7 days. This field is a member of `oneof`_ ``time``. read_time (google.protobuf.timestamp_pb2.Timestamp): @@ -2670,15 +2851,17 @@ class QueryAssetsRequest(proto.Message): This field is a member of `oneof`_ ``time``. output_config (google.cloud.asset_v1.types.QueryAssetsOutputConfig): - Optional. Destination where the query results will be saved. - - When this field is specified, the query results won't be - saved in the [QueryAssetsResponse.query_result]. Instead + Optional. Destination where the query results + will be saved. + When this field is specified, the query results + won't be saved in the + [QueryAssetsResponse.query_result]. Instead [QueryAssetsResponse.output_config] will be set. - Meanwhile, [QueryAssetsResponse.job_reference] will be set - and can be used to check the status of the query job when - passed to a following [QueryAssets] API call. + Meanwhile, [QueryAssetsResponse.job_reference] + will be set and can be used to check the status + of the query job when passed to a following + [QueryAssets] API call. """ parent: str = proto.Field( @@ -2741,13 +2924,14 @@ class QueryAssetsResponse(proto.Message): job_reference (str): Reference to a query job. done (bool): - The query response, which can be either an ``error`` or a - valid ``response``. - - If ``done`` == ``false`` and the query result is being saved - in a output, the output_config field will be set. If - ``done`` == ``true``, exactly one of ``error``, - ``query_result`` or ``output_config`` will be set. + The query response, which can be either an + `error` or a valid `response`. + If `done` == `false` and the query result is + being saved in a output, the output_config field + will be set. + If `done` == `true`, exactly one of + `error`, `query_result` or `output_config` will + be set. error (google.rpc.status_pb2.Status): Error status. @@ -2796,13 +2980,15 @@ class QueryAssetsResponse(proto.Message): class QueryResult(proto.Message): r"""Execution results of the query. - The result is formatted as rows represented by BigQuery compatible - [schema]. When pagination is necessary, it will contains the page - token to retrieve the results of following pages. + The result is formatted as rows represented by BigQuery + compatible [schema]. When pagination is necessary, it will + contains the page token to retrieve the results of following + pages. Attributes: rows (MutableSequence[google.protobuf.struct_pb2.Struct]): - Each row hold a query result in the format of ``Struct``. + Each row hold a query result in the format of + `Struct`. schema (google.cloud.asset_v1.types.TableSchema): Describes the format of the [rows]. next_page_token (str): @@ -2856,27 +3042,28 @@ class TableFieldSchema(proto.Message): Attributes: field (str): - The field name. The name must contain only letters (a-z, - A-Z), numbers (0-9), or underscores (\_), and must start - with a letter or underscore. The maximum length is 128 + The field name. The name must contain only + letters (a-z, A-Z), numbers (0-9), or + underscores (_), and must start with a letter or + underscore. The maximum length is 128 characters. type_ (str): The field data type. Possible values include - - - STRING - - BYTES - - INTEGER - - FLOAT - - BOOLEAN - - TIMESTAMP - - DATE - - TIME - - DATETIME - - GEOGRAPHY, - - NUMERIC, - - BIGNUMERIC, - - RECORD (where RECORD indicates that the field contains a - nested schema). + * STRING + * BYTES + * INTEGER + * FLOAT + * BOOLEAN + * TIMESTAMP + * DATE + * TIME + * DATETIME + * GEOGRAPHY, + * NUMERIC, + * BIGNUMERIC, + * RECORD + (where RECORD indicates that the field contains + a nested schema). mode (str): The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default @@ -2911,27 +3098,28 @@ class BatchGetEffectiveIamPoliciesRequest(proto.Message): Attributes: scope (str): - Required. Only IAM policies on or below the scope will be - returned. - + Required. Only IAM policies on or below the + scope will be returned. This can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as - "projects/my-project-id"), or a project number (such as - "projects/12345"). + "projects/my-project-id"), or a project number + (such as "projects/12345"). - To know how to get organization id, visit - `here `__. + To know how to get organization id, visit [here + ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). To know how to get folder or project id, visit - `here `__. + [here + ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). names (MutableSequence[str]): - Required. The names refer to the [full_resource_names] + Required. The names refer to the + [full_resource_names] (https://cloud.google.com/asset-inventory/docs/resource-name-format) - of `searchable asset - types `__. - A maximum of 20 resources' effective policies can be - retrieved in a batch. + of [searchable asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + A maximum of 20 resources' effective policies + can be retrieved in a batch. """ scope: str = proto.Field( @@ -2950,11 +3138,13 @@ class BatchGetEffectiveIamPoliciesResponse(proto.Message): Attributes: policy_results (MutableSequence[google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy]): - The effective policies for a batch of resources. Note that - the results order is the same as the order of + The effective policies for a batch of + resources. Note that the results order is the + same as the order of [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]. - When a resource does not have any effective IAM policies, - its corresponding policy_result will contain empty + When a resource does not have any effective IAM + policies, its corresponding policy_result will + contain empty [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]. """ @@ -2976,17 +3166,19 @@ class EffectiveIamPolicy(proto.Message): These policies include the policy set on the [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name] - and those set on its parents and ancestors up to the + and those set on its parents and ancestors up to + the [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope]. - Note that these policies are not filtered according to the - resource type of the + Note that these policies are not filtered + according to the resource type of the [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]. These policies are hierarchically ordered by [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource] starting from [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name] - itself to its parents and ancestors, such that policies[i]'s + itself to its parents and ancestors, such that + policies[i]'s [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource] is the child of policies[i+1]'s [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource], @@ -3002,7 +3194,8 @@ class PolicyInfo(proto.Message): [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy] is directly attached to. policy (google.iam.v1.policy_pb2.Policy): - The IAM policy that's directly attached to the + The IAM policy that's directly attached to + the [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]. """ @@ -3043,34 +3236,38 @@ class AnalyzerOrgPolicy(proto.Message): attached_resource (str): The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) - of an organization/folder/project resource where this - organization policy is set. + of an organization/folder/project resource where + this organization policy is set. - Notice that some type of constraints are defined with - default policy. This field will be empty for them. + Notice that some type of constraints are defined + with default policy. This field will be empty + for them. applied_resource (str): The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) - of an organization/folder/project resource where this - organization policy applies to. + of an organization/folder/project resource where + this organization policy applies to. - For any user defined org policies, this field has the same - value as the [attached_resource] field. Only for default - policy, this field has the different value. + For any user defined org policies, this field + has the same value as the [attached_resource] + field. Only for default policy, this field has + the different value. rules (MutableSequence[google.cloud.asset_v1.types.AnalyzerOrgPolicy.Rule]): List of rules for this organization policy. inherit_from_parent (bool): - If ``inherit_from_parent`` is true, Rules set higher up in - the hierarchy (up to the closest root) are inherited and - present in the effective policy. If it is false, then no - rules are inherited, and this policy becomes the effective + If `inherit_from_parent` is true, Rules set + higher up in the hierarchy (up to the closest + root) are inherited and present in the effective + policy. If it is false, then no rules are + inherited, and this policy becomes the effective root for evaluation. reset (bool): - Ignores policies set above this resource and restores the - default behavior of the constraint at this resource. This - field can be set in policies for either list or boolean - constraints. If set, ``rules`` must be empty and - ``inherit_from_parent`` must be set to false. + Ignores policies set above this resource and + restores the default behavior of the constraint + at this resource. This field can be set in + policies for either list or boolean constraints. + If set, `rules` must be empty and + `inherit_from_parent` must be set to false. """ class Rule(proto.Message): @@ -3103,9 +3300,10 @@ class Rule(proto.Message): This field is a member of `oneof`_ ``kind``. enforce (bool): - If ``true``, then the ``Policy`` is enforced. If ``false``, - then any configuration is acceptable. This field can be set - only in Policies for boolean constraints. + If `true`, then the `Policy` is enforced. If + `false`, then any configuration is acceptable. + This field can be set only in Policies for + boolean constraints. This field is a member of `oneof`_ ``kind``. condition (google.type.expr_pb2.Expr): @@ -3215,18 +3413,18 @@ class Constraint(proto.Message): Attributes: name (str): - The unique name of the constraint. Format of the name should - be - - - ``constraints/{constraint_name}`` + The unique name of the constraint. Format of + the name should be * + `constraints/{constraint_name}` For example, - ``constraints/compute.disableSerialPortAccess``. + `constraints/compute.disableSerialPortAccess`. display_name (str): The human readable name of the constraint. description (str): - Detailed description of what this ``Constraint`` controls as - well as how and where it is enforced. + Detailed description of what this + `Constraint` controls as well as how and where + it is enforced. constraint_default (google.cloud.asset_v1.types.AnalyzerOrgPolicyConstraint.Constraint.ConstraintDefault): The evaluation behavior of this constraint in the absence of 'Policy'. @@ -3242,9 +3440,9 @@ class Constraint(proto.Message): This field is a member of `oneof`_ ``constraint_type``. """ class ConstraintDefault(proto.Enum): - r"""Specifies the default behavior in the absence of any ``Policy`` for - the ``Constraint``. This must not be - ``CONSTRAINT_DEFAULT_UNSPECIFIED``. + r"""Specifies the default behavior in the absence of any `Policy` + for the `Constraint`. This must not be + `CONSTRAINT_DEFAULT_UNSPECIFIED`. Values: CONSTRAINT_DEFAULT_UNSPECIFIED (0): @@ -3264,22 +3462,25 @@ class ConstraintDefault(proto.Enum): DENY = 2 class ListConstraint(proto.Message): - r"""A ``Constraint`` that allows or disallows a list of string values, - which are configured by an organization's policy administrator with - a ``Policy``. + r"""A `Constraint` that allows or disallows a list of string + values, which are configured by an organization's policy + administrator with a `Policy`. Attributes: supports_in (bool): - Indicates whether values grouped into categories can be used - in ``Policy.allowed_values`` and ``Policy.denied_values``. - For example, ``"in:Python"`` would match any value in the + Indicates whether values grouped into + categories can be used in + `Policy.allowed_values` and + `Policy.denied_values`. For example, + `"in:Python"` would match any value in the 'Python' group. supports_under (bool): - Indicates whether subtrees of Cloud Resource Manager - resource hierarchy can be used in ``Policy.allowed_values`` - and ``Policy.denied_values``. For example, - ``"under:folders/123"`` would match any resource under the - 'folders/123' folder. + Indicates whether subtrees of Cloud Resource + Manager resource hierarchy can be used in + `Policy.allowed_values` and + `Policy.denied_values`. For example, + `"under:folders/123"` would match any resource + under the 'folders/123' folder. """ supports_in: bool = proto.Field( @@ -3292,12 +3493,12 @@ class ListConstraint(proto.Message): ) class BooleanConstraint(proto.Message): - r"""A ``Constraint`` that is either enforced or not. + r"""A `Constraint` that is either enforced or not. For example a constraint - ``constraints/compute.disableSerialPortAccess``. If it is enforced - on a VM instance, serial port connections will not be opened to that - instance. + `constraints/compute.disableSerialPortAccess`. If it is enforced + on a VM instance, serial port connections will not be opened to + that instance. """ @@ -3336,25 +3537,27 @@ class CustomConstraint(proto.Message): Attributes: name (str): - Name of the constraint. This is unique within the - organization. Format of the name should be - - - ``organizations/{organization_id}/customConstraints/{custom_constraint_id}`` + Name of the constraint. This is unique within + the organization. Format of the name should be * + `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example : + "organizations/123/customConstraints/custom.createOnlyE2TypeVms". resource_types (MutableSequence[str]): - The Resource Instance type on which this policy applies to. - Format will be of the form : "/" Example: + The Resource Instance type on which this + policy applies to. Format will be of the form : + "/" Example: - - ``compute.googleapis.com/Instance``. + * `compute.googleapis.com/Instance`. method_types (MutableSequence[google.cloud.asset_v1.types.AnalyzerOrgPolicyConstraint.CustomConstraint.MethodType]): All the operations being applied for this constraint. condition (str): - Organization Policy condition/expression. For example: - ``resource.instanceName.matches("[production|test]_.*_(\d)+")'`` - or, ``resource.management.auto_upgrade == true`` + Organization Policy condition/expression. For + example: + `resource.instanceName.matches("[production|test]_.*_(\d)+")'` + or, `resource.management.auto_upgrade == true` action_type (google.cloud.asset_v1.types.AnalyzerOrgPolicyConstraint.CustomConstraint.ActionType): Allow or deny type. display_name (str): @@ -3364,10 +3567,11 @@ class CustomConstraint(proto.Message): constraint. """ class MethodType(proto.Enum): - r"""The operation in which this constraint will be applied. For example: - If the constraint applies only when create VMs, the method_types - will be "CREATE" only. If the constraint applied when create or - delete VMs, the method_types will be "CREATE" and "DELETE". + r"""The operation in which this constraint will be applied. For + example: If the constraint applies only when create VMs, the + method_types will be "CREATE" only. If the constraint applied + when create or delete VMs, the method_types will be "CREATE" and + "DELETE". Values: METHOD_TYPE_UNSPECIFIED (0): @@ -3456,11 +3660,12 @@ class AnalyzeOrgPoliciesRequest(proto.Message): Attributes: scope (str): - Required. The organization to scope the request. Only - organization policies within the scope will be analyzed. + Required. The organization to scope the + request. Only organization policies within the + scope will be analyzed. - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * organizations/{ORGANIZATION_NUMBER} (e.g., + "organizations/123456") constraint (str): Required. The name of the constraint to analyze organization policies for. The response @@ -3470,15 +3675,17 @@ class AnalyzeOrgPoliciesRequest(proto.Message): The expression to filter [AnalyzeOrgPoliciesResponse.org_policy_results][google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.org_policy_results]. The only supported field is - ``consolidated_policy.attached_resource``, and the only - supported operator is ``=``. + `consolidated_policy.attached_resource`, and the + only supported operator is `=`. Example: + consolidated_policy.attached_resource="//cloudresourcemanager.googleapis.com/folders/001" - will return the org policy results of"folders/001". + will return the org policy results + of"folders/001". page_size (int): - The maximum number of items to return per page. If - unspecified, + The maximum number of items to return per + page. If unspecified, [AnalyzeOrgPoliciesResponse.org_policy_results][google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.org_policy_results] will contain 20 items with a maximum of 200. @@ -3534,19 +3741,21 @@ class OrgPolicyResult(proto.Message): Attributes: consolidated_policy (google.cloud.asset_v1.types.AnalyzerOrgPolicy): - The consolidated organization policy for the analyzed - resource. The consolidated organization policy is computed - by merging and evaluating - [AnalyzeOrgPoliciesResponse.policy_bundle][]. The evaluation - will respect the organization policy `hierarchy - rules `__. + The consolidated organization policy for the + analyzed resource. The consolidated organization + policy is computed by merging and evaluating + [AnalyzeOrgPoliciesResponse.policy_bundle][]. + The evaluation will respect the organization + policy [hierarchy + rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy). policy_bundle (MutableSequence[google.cloud.asset_v1.types.AnalyzerOrgPolicy]): - The ordered list of all organization policies from the + The ordered list of all organization policies + from the [AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.attached_resource][]. to the scope specified in the request. - If the constraint is defined with default policy, it will - also appear in the list. + If the constraint is defined with default + policy, it will also appear in the list. """ consolidated_policy: 'AnalyzerOrgPolicy' = proto.Field( @@ -3589,29 +3798,32 @@ class AnalyzeOrgPolicyGovernedContainersRequest(proto.Message): Attributes: scope (str): - Required. The organization to scope the request. Only - organization policies within the scope will be analyzed. The - output containers will also be limited to the ones governed - by those in-scope organization policies. + Required. The organization to scope the + request. Only organization policies within the + scope will be analyzed. The output containers + will also be limited to the ones governed by + those in-scope organization policies. - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + * organizations/{ORGANIZATION_NUMBER} (e.g., + "organizations/123456") constraint (str): Required. The name of the constraint to analyze governed containers for. The analysis only contains organization policies for the provided constraint. filter (str): - The expression to filter the governed containers in result. - The only supported field is ``parent``, and the only - supported operator is ``=``. + The expression to filter the governed + containers in result. The only supported field + is `parent`, and the only supported operator is + `=`. Example: + parent="//cloudresourcemanager.googleapis.com/folders/001" will return all containers under "folders/001". page_size (int): - The maximum number of items to return per page. If - unspecified, + The maximum number of items to return per + page. If unspecified, [AnalyzeOrgPolicyGovernedContainersResponse.governed_containers][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.governed_containers] will contain 100 items with a maximum of 200. @@ -3660,8 +3872,8 @@ class AnalyzeOrgPolicyGovernedContainersResponse(proto.Message): """ class GovernedContainer(proto.Message): - r"""The organization/folder/project resource governed by organization - policies of + r"""The organization/folder/project resource governed by + organization policies of [AnalyzeOrgPolicyGovernedContainersRequest.constraint][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest.constraint]. Attributes: @@ -3675,20 +3887,21 @@ class GovernedContainer(proto.Message): of the parent of [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name]. consolidated_policy (google.cloud.asset_v1.types.AnalyzerOrgPolicy): - The consolidated organization policy for the analyzed - resource. The consolidated organization policy is computed - by merging and evaluating + The consolidated organization policy for the + analyzed resource. The consolidated organization + policy is computed by merging and evaluating [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle]. - The evaluation will respect the organization policy - `hierarchy - rules `__. + The evaluation will respect the organization + policy [hierarchy + rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy). policy_bundle (MutableSequence[google.cloud.asset_v1.types.AnalyzerOrgPolicy]): - The ordered list of all organization policies from the + The ordered list of all organization policies + from the [AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.attached_resource][]. to the scope specified in the request. - If the constraint is defined with default policy, it will - also appear in the list. + If the constraint is defined with default + policy, it will also appear in the list. """ full_resource_name: str = proto.Field( @@ -3739,38 +3952,43 @@ class AnalyzeOrgPolicyGovernedAssetsRequest(proto.Message): Attributes: scope (str): - Required. The organization to scope the request. Only - organization policies within the scope will be analyzed. The - output assets will also be limited to the ones governed by - those in-scope organization policies. - - - organizations/{ORGANIZATION_NUMBER} (e.g., - "organizations/123456") + Required. The organization to scope the + request. Only organization policies within the + scope will be analyzed. The output assets will + also be limited to the ones governed by those + in-scope organization policies. + + * organizations/{ORGANIZATION_NUMBER} (e.g., + "organizations/123456") constraint (str): Required. The name of the constraint to analyze governed assets for. The analysis only contains analyzed organization policies for the provided constraint. filter (str): - The expression to filter the governed assets in result. The - only supported fields for governed resources are - ``governed_resource.project`` and - ``governed_resource.folders``. The only supported fields for - governed iam policies are ``governed_iam_policy.project`` - and ``governed_iam_policy.folders``. The only supported - operator is ``=``. - - Example 1: governed_resource.project="projects/12345678" + The expression to filter the governed assets + in result. The only supported fields for + governed resources are + `governed_resource.project` and + `governed_resource.folders`. The only supported + fields for governed iam policies are + `governed_iam_policy.project` and + `governed_iam_policy.folders`. The only + supported operator is `=`. + + Example 1: + governed_resource.project="projects/12345678" filter will return all governed resources under - projects/12345678 including the project ifself, if - applicable. + projects/12345678 including the project ifself, + if applicable. - Example 2: governed_iam_policy.folders="folders/12345678" - filter will return all governed iam policies under - folders/12345678, if applicable. + Example 2: + governed_iam_policy.folders="folders/12345678" + filter will return all governed iam policies + under folders/12345678, if applicable. page_size (int): - The maximum number of items to return per page. If - unspecified, + The maximum number of items to return per + page. If unspecified, [AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.governed_assets] will contain 100 items with a maximum of 200. @@ -3819,8 +4037,8 @@ class AnalyzeOrgPolicyGovernedAssetsResponse(proto.Message): """ class GovernedResource(proto.Message): - r"""The Google Cloud resources governed by the organization policies of - the + r"""The Google Cloud resources governed by the organization + policies of the [AnalyzeOrgPolicyGovernedAssetsRequest.constraint][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest.constraint]. Attributes: @@ -3834,19 +4052,22 @@ class GovernedResource(proto.Message): of the parent of [AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResource.full_resource_name][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResource.full_resource_name]. project (str): - The project that this resource belongs to, in the format of - projects/{PROJECT_NUMBER}. This field is available when the - resource belongs to a project. + The project that this resource belongs to, in + the format of projects/{PROJECT_NUMBER}. This + field is available when the resource belongs to + a project. folders (MutableSequence[str]): - The folder(s) that this resource belongs to, in the format - of folders/{FOLDER_NUMBER}. This field is available when the - resource belongs (directly or cascadingly) to one or more + The folder(s) that this resource belongs to, + in the format of folders/{FOLDER_NUMBER}. This + field is available when the resource belongs + (directly or cascadingly) to one or more folders. organization (str): - The organization that this resource belongs to, in the - format of organizations/{ORGANIZATION_NUMBER}. This field is - available when the resource belongs (directly or - cascadingly) to an organization. + The organization that this resource belongs + to, in the format of + organizations/{ORGANIZATION_NUMBER}. This field + is available when the resource belongs (directly + or cascadingly) to an organization. """ full_resource_name: str = proto.Field( @@ -3876,29 +4097,33 @@ class GovernedIamPolicy(proto.Message): Attributes: attached_resource (str): - The full resource name of the resource associated with this - IAM policy. Example: - ``//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1``. - See `Cloud Asset Inventory Resource Name - Format `__ + The full resource name of the resource + associated with this IAM policy. Example: + + `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + See [Cloud Asset Inventory Resource Name + Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) for more information. policy (google.iam.v1.policy_pb2.Policy): The IAM policy directly set on the given resource. project (str): - The project that this IAM policy belongs to, in the format - of projects/{PROJECT_NUMBER}. This field is available when - the IAM policy belongs to a project. + The project that this IAM policy belongs to, + in the format of projects/{PROJECT_NUMBER}. This + field is available when the IAM policy belongs + to a project. folders (MutableSequence[str]): - The folder(s) that this IAM policy belongs to, in the format - of folders/{FOLDER_NUMBER}. This field is available when the - IAM policy belongs (directly or cascadingly) to one or more + The folder(s) that this IAM policy belongs + to, in the format of folders/{FOLDER_NUMBER}. + This field is available when the IAM policy + belongs (directly or cascadingly) to one or more folders. organization (str): - The organization that this IAM policy belongs to, in the - format of organizations/{ORGANIZATION_NUMBER}. This field is - available when the IAM policy belongs (directly or - cascadingly) to an organization. + The organization that this IAM policy belongs + to, in the format of + organizations/{ORGANIZATION_NUMBER}. This field + is available when the IAM policy belongs + (directly or cascadingly) to an organization. """ attached_resource: str = proto.Field( @@ -3924,8 +4149,8 @@ class GovernedIamPolicy(proto.Message): ) class GovernedAsset(proto.Message): - r"""Represents a Google Cloud asset(resource or IAM policy) governed by - the organization policies of the + r"""Represents a Google Cloud asset(resource or IAM policy) + governed by the organization policies of the [AnalyzeOrgPolicyGovernedAssetsRequest.constraint][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest.constraint]. This message has `oneof`_ fields (mutually exclusive fields). @@ -3937,30 +4162,33 @@ class GovernedAsset(proto.Message): Attributes: governed_resource (google.cloud.asset_v1.types.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResource): - A Google Cloud resource governed by the organization - policies of the + A Google Cloud resource governed by the + organization policies of the [AnalyzeOrgPolicyGovernedAssetsRequest.constraint][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest.constraint]. This field is a member of `oneof`_ ``governed_asset``. governed_iam_policy (google.cloud.asset_v1.types.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedIamPolicy): - An IAM policy governed by the organization policies of the + An IAM policy governed by the organization + policies of the [AnalyzeOrgPolicyGovernedAssetsRequest.constraint][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsRequest.constraint]. This field is a member of `oneof`_ ``governed_asset``. consolidated_policy (google.cloud.asset_v1.types.AnalyzerOrgPolicy): - The consolidated policy for the analyzed asset. The - consolidated policy is computed by merging and evaluating + The consolidated policy for the analyzed + asset. The consolidated policy is computed by + merging and evaluating [AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.policy_bundle][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedAssetsResponse.GovernedAsset.policy_bundle]. - The evaluation will respect the organization policy - `hierarchy - rules `__. + The evaluation will respect the organization + policy [hierarchy + rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy). policy_bundle (MutableSequence[google.cloud.asset_v1.types.AnalyzerOrgPolicy]): - The ordered list of all organization policies from the + The ordered list of all organization policies + from the [AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.attached_resource][] to the scope specified in the request. - If the constraint is defined with default policy, it will - also appear in the list. + If the constraint is defined with default + policy, it will also appear in the list. """ governed_resource: 'AnalyzeOrgPolicyGovernedAssetsResponse.GovernedResource' = proto.Field( diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/types/assets.py b/tests/integration/goldens/asset/google/cloud/asset_v1/types/assets.py index d2097a07a4..b2755be6aa 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/types/assets.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/types/assets.py @@ -69,16 +69,17 @@ class TemporalAsset(proto.Message): prior_asset_state (google.cloud.asset_v1.types.TemporalAsset.PriorAssetState): State of prior_asset. prior_asset (google.cloud.asset_v1.types.Asset): - Prior copy of the asset. Populated if prior_asset_state is - PRESENT. Currently this is only set for responses in - Real-Time Feed. + Prior copy of the asset. Populated if + prior_asset_state is PRESENT. Currently this is + only set for responses in Real-Time Feed. """ class PriorAssetState(proto.Enum): r"""State of prior asset. Values: PRIOR_ASSET_STATE_UNSPECIFIED (0): - prior_asset is not applicable for the current asset. + prior_asset is not applicable for the current + asset. PRESENT (1): prior_asset is populated correctly. INVALID (2): @@ -121,7 +122,7 @@ class PriorAssetState(proto.Enum): class TimeWindow(proto.Message): - r"""A time window specified by its ``start_time`` and ``end_time``. + r"""A time window specified by its `start_time` and `end_time`. Attributes: start_time (google.protobuf.timestamp_pb2.Timestamp): @@ -145,14 +146,14 @@ class TimeWindow(proto.Message): class Asset(proto.Message): - r"""An asset in Google Cloud. An asset can be any resource in the Google - Cloud `resource - hierarchy `__, + r"""An asset in Google Cloud. An asset can be any resource in the + Google Cloud [resource + hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), a resource outside the Google Cloud resource hierarchy (such as - Google Kubernetes Engine clusters and objects), or a policy (e.g. - IAM policy), or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP - relationship). See `Supported asset - types `__ + Google Kubernetes Engine clusters and objects), or a policy + (e.g. IAM policy), or a relationship (e.g. an + INSTANCE_TO_INSTANCEGROUP relationship). See [Supported asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information. This message has `oneof`_ fields (mutually exclusive fields). @@ -164,59 +165,65 @@ class Asset(proto.Message): Attributes: update_time (google.protobuf.timestamp_pb2.Timestamp): - The last update timestamp of an asset. update_time is - updated when create/update/delete operation is performed. + The last update timestamp of an asset. + update_time is updated when create/update/delete + operation is performed. name (str): The full name of the asset. Example: - ``//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`` - See `Resource - names `__ + `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` + + See [Resource + names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information. asset_type (str): The type of the asset. Example: - ``compute.googleapis.com/Disk`` - - See `Supported asset - types `__ + `compute.googleapis.com/Disk` + See [Supported asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information. resource (google.cloud.asset_v1.types.Resource): A representation of the resource. iam_policy (google.iam.v1.policy_pb2.Policy): - A representation of the IAM policy set on a Google Cloud - resource. There can be a maximum of one IAM policy set on - any given resource. In addition, IAM policies inherit their - granted access scope from any policies set on parent - resources in the resource hierarchy. Therefore, the - effectively policy is the union of both the policy set on - this resource and each policy set on all of the resource's - ancestry resource levels in the hierarchy. See `this - topic `__ + A representation of the IAM policy set on a + Google Cloud resource. There can be a maximum of + one IAM policy set on any given resource. In + addition, IAM policies inherit their granted + access scope from any policies set on parent + resources in the resource hierarchy. Therefore, + the effectively policy is the union of both the + policy set on this resource and each policy set + on all of the resource's ancestry resource + levels in the hierarchy. See + [this + topic](https://cloud.google.com/iam/help/allow-policies/inheritance) for more information. org_policy (MutableSequence[google.cloud.orgpolicy.v1.orgpolicy_pb2.Policy]): - A representation of an `organization - policy `__. - There can be more than one organization policy with - different constraints set on a given resource. + A representation of an [organization + policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy). + There can be more than one organization policy + with different constraints set on a given + resource. access_policy (google.identity.accesscontextmanager.v1.access_policy_pb2.AccessPolicy): - Please also refer to the `access policy user - guide `__. + Please also refer to the [access policy user + guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies). This field is a member of `oneof`_ ``access_context_policy``. access_level (google.identity.accesscontextmanager.v1.access_level_pb2.AccessLevel): - Please also refer to the `access level user - guide `__. + Please also refer to the [access level user + guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels). This field is a member of `oneof`_ ``access_context_policy``. service_perimeter (google.identity.accesscontextmanager.v1.service_perimeter_pb2.ServicePerimeter): - Please also refer to the `service perimeter user - guide `__. + Please also refer to the [service perimeter + user + guide](https://cloud.google.com/vpc-service-controls/docs/overview). This field is a member of `oneof`_ ``access_context_policy``. os_inventory (google.cloud.osconfig.v1.inventory_pb2.Inventory): - A representation of runtime OS Inventory information. See - `this - topic `__ + A representation of runtime OS Inventory + information. See [this + topic](https://cloud.google.com/compute/docs/instances/os-inventory-management) for more information. related_assets (google.cloud.asset_v1.types.RelatedAssets): DEPRECATED. This field only presents for the @@ -228,16 +235,17 @@ class Asset(proto.Message): related_asset (google.cloud.asset_v1.types.RelatedAsset): One related asset of the current asset. ancestors (MutableSequence[str]): - The ancestry path of an asset in Google Cloud `resource - hierarchy `__, - represented as a list of relative resource names. An - ancestry path starts with the closest ancestor in the - hierarchy and ends at root. If the asset is a project, - folder, or organization, the ancestry path starts from the - asset itself. - - Example: - ``["projects/123456789", "folders/5432", "organizations/1234"]`` + The ancestry path of an asset in Google Cloud + [resource + hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + represented as a list of relative resource + names. An ancestry path starts with the closest + ancestor in the hierarchy and ends at root. If + the asset is a project, folder, or organization, + the ancestry path starts from the asset itself. + + Example: `["projects/123456789", "folders/5432", + "organizations/1234"]` """ update_time: timestamp_pb2.Timestamp = proto.Field( @@ -312,39 +320,47 @@ class Resource(proto.Message): Attributes: version (str): - The API version. Example: ``v1`` + The API version. Example: `v1` discovery_document_uri (str): - The URL of the discovery document containing the resource's - JSON schema. Example: - ``https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`` + The URL of the discovery document containing + the resource's JSON schema. Example: + + `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` - This value is unspecified for resources that do not have an - API based on a discovery document, such as Cloud Bigtable. + This value is unspecified for resources that do + not have an API based on a discovery document, + such as Cloud Bigtable. discovery_name (str): - The JSON schema name listed in the discovery document. - Example: ``Project`` + The JSON schema name listed in the discovery + document. Example: `Project` - This value is unspecified for resources that do not have an - API based on a discovery document, such as Cloud Bigtable. + This value is unspecified for resources that do + not have an API based on a discovery document, + such as Cloud Bigtable. resource_url (str): - The REST URL for accessing the resource. An HTTP ``GET`` - request using this URL returns the resource itself. Example: - ``https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`` + The REST URL for accessing the resource. An + HTTP `GET` request using this URL returns the + resource itself. Example: - This value is unspecified for resources without a REST API. + `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123` + + This value is unspecified for resources without + a REST API. parent (str): - The full name of the immediate parent of this resource. See - `Resource - Names `__ + The full name of the immediate parent of this + resource. See [Resource + Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information. - For Google Cloud assets, this value is the parent resource - defined in the `IAM policy - hierarchy `__. + For Google Cloud assets, this value is the + parent resource defined in the [IAM policy + hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). Example: - ``//cloudresourcemanager.googleapis.com/projects/my_project_123`` - For third-party assets, this field may be set differently. + `//cloudresourcemanager.googleapis.com/projects/my_project_123` + + For third-party assets, this field may be set + differently. data (google.protobuf.struct_pb2.Struct): The content of the resource, in which some sensitive fields are removed and may not be @@ -389,9 +405,9 @@ class Resource(proto.Message): class RelatedAssets(proto.Message): r"""DEPRECATED. This message only presents for the purpose of - backward-compatibility. The server will never populate this message - in responses. The detailed related assets with the - ``relationship_type``. + backward-compatibility. The server will never populate this + message in responses. + The detailed related assets with the `relationship_type`. Attributes: relationship_attributes (google.cloud.asset_v1.types.RelationshipAttributes): @@ -414,23 +430,24 @@ class RelatedAssets(proto.Message): class RelationshipAttributes(proto.Message): r"""DEPRECATED. This message only presents for the purpose of - backward-compatibility. The server will never populate this message - in responses. The relationship attributes which include ``type``, - ``source_resource_type``, ``target_resource_type`` and ``action``. + backward-compatibility. The server will never populate this + message in responses. + The relationship attributes which include `type`, + `source_resource_type`, `target_resource_type` and `action`. Attributes: type_ (str): - The unique identifier of the relationship type. Example: - ``INSTANCE_TO_INSTANCEGROUP`` + The unique identifier of the relationship + type. Example: `INSTANCE_TO_INSTANCEGROUP` source_resource_type (str): The source asset type. Example: - ``compute.googleapis.com/Instance`` + `compute.googleapis.com/Instance` target_resource_type (str): The target asset type. Example: - ``compute.googleapis.com/Disk`` + `compute.googleapis.com/Disk` action (str): - The detail of the relationship, e.g. ``contains``, - ``attaches`` + The detail of the relationship, e.g. + `contains`, `attaches` """ type_: str = proto.Field( @@ -452,43 +469,44 @@ class RelationshipAttributes(proto.Message): class RelatedAsset(proto.Message): - r"""An asset identifier in Google Cloud which contains its name, type - and ancestors. An asset can be any resource in the Google Cloud - `resource - hierarchy `__, + r"""An asset identifier in Google Cloud which contains its name, + type and ancestors. An asset can be any resource in the Google + Cloud [resource + hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), a resource outside the Google Cloud resource hierarchy (such as - Google Kubernetes Engine clusters and objects), or a policy (e.g. - IAM policy). See `Supported asset - types `__ + Google Kubernetes Engine clusters and objects), or a policy + (e.g. IAM policy). See [Supported asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information. Attributes: asset (str): The full name of the asset. Example: - ``//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`` - See `Resource - names `__ + `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` + + See [Resource + names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information. asset_type (str): The type of the asset. Example: - ``compute.googleapis.com/Disk`` - - See `Supported asset - types `__ + `compute.googleapis.com/Disk` + See [Supported asset + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information. ancestors (MutableSequence[str]): - The ancestors of an asset in Google Cloud `resource - hierarchy `__, - represented as a list of relative resource names. An - ancestry path starts with the closest ancestor in the - hierarchy and ends at root. - - Example: - ``["projects/123456789", "folders/5432", "organizations/1234"]`` + The ancestors of an asset in Google Cloud + [resource + hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + represented as a list of relative resource + names. An ancestry path starts with the closest + ancestor in the hierarchy and ends at root. + + Example: `["projects/123456789", "folders/5432", + "organizations/1234"]` relationship_type (str): - The unique identifier of the relationship type. Example: - ``INSTANCE_TO_INSTANCEGROUP`` + The unique identifier of the relationship + type. Example: `INSTANCE_TO_INSTANCEGROUP` """ asset: str = proto.Field( @@ -515,305 +533,339 @@ class ResourceSearchResult(proto.Message): Attributes: name (str): - The full resource name of this resource. Example: - ``//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1``. - See `Cloud Asset Inventory Resource Name - Format `__ + The full resource name of this resource. + Example: + `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + See [Cloud Asset Inventory Resource Name + Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) for more information. - To search against the ``name``: + To search against the `name`: - - Use a field query. Example: ``name:instance1`` - - Use a free text query. Example: ``instance1`` + * Use a field query. Example: `name:instance1` * + Use a free text query. Example: `instance1` asset_type (str): The type of this resource. Example: - ``compute.googleapis.com/Disk``. - - To search against the ``asset_type``: + `compute.googleapis.com/Disk`. + To search against the `asset_type`: - - Specify the ``asset_type`` field in your search request. + * Specify the `asset_type` field in your search + request. project (str): - The project that this resource belongs to, in the form of - projects/{PROJECT_NUMBER}. This field is available when the - resource belongs to a project. + The project that this resource belongs to, in + the form of projects/{PROJECT_NUMBER}. This + field is available when the resource belongs to + a project. - To search against ``project``: + To search against `project`: - - Use a field query. Example: ``project:12345`` - - Use a free text query. Example: ``12345`` - - Specify the ``scope`` field as this project in your search - request. + * Use a field query. Example: `project:12345` * + Use a free text query. Example: `12345` + * Specify the `scope` field as this project in + your search request. folders (MutableSequence[str]): - The folder(s) that this resource belongs to, in the form of - folders/{FOLDER_NUMBER}. This field is available when the - resource belongs to one or more folders. + The folder(s) that this resource belongs to, + in the form of folders/{FOLDER_NUMBER}. This + field is available when the resource belongs to + one or more folders. - To search against ``folders``: + To search against `folders`: - - Use a field query. Example: ``folders:(123 OR 456)`` - - Use a free text query. Example: ``123`` - - Specify the ``scope`` field as this folder in your search - request. + * Use a field query. Example: `folders:(123 OR + 456)` * Use a free text query. Example: `123` + * Specify the `scope` field as this folder in + your search request. organization (str): - The organization that this resource belongs to, in the form - of organizations/{ORGANIZATION_NUMBER}. This field is - available when the resource belongs to an organization. - - To search against ``organization``: - - - Use a field query. Example: ``organization:123`` - - Use a free text query. Example: ``123`` - - Specify the ``scope`` field as this organization in your - search request. + The organization that this resource belongs + to, in the form of + organizations/{ORGANIZATION_NUMBER}. This field + is available when the resource belongs to an + organization. + + To search against `organization`: + + * Use a field query. Example: `organization:123` + * Use a free text query. Example: `123` + * Specify the `scope` field as this organization + in your search request. display_name (str): - The display name of this resource. This field is available - only when the resource's Protobuf contains it. + The display name of this resource. This field + is available only when the resource's Protobuf + contains it. - To search against the ``display_name``: + To search against the `display_name`: - - Use a field query. Example: ``displayName:"My Instance"`` - - Use a free text query. Example: ``"My Instance"`` + * Use a field query. Example: `displayName:"My + Instance"` * Use a free text query. Example: + `"My Instance"` description (str): - One or more paragraphs of text description of this resource. - Maximum length could be up to 1M bytes. This field is - available only when the resource's Protobuf contains it. + One or more paragraphs of text description of + this resource. Maximum length could be up to 1M + bytes. This field is available only when the + resource's Protobuf contains it. - To search against the ``description``: + To search against the `description`: - - Use a field query. Example: - ``description:"important instance"`` - - Use a free text query. Example: ``"important instance"`` + * Use a field query. Example: + `description:"important instance"` * Use a free + text query. Example: `"important instance"` location (str): - Location can be ``global``, regional like ``us-east1``, or - zonal like ``us-west1-b``. This field is available only when - the resource's Protobuf contains it. + Location can be `global`, regional like + `us-east1`, or zonal like `us-west1-b`. This + field is available only when the resource's + Protobuf contains it. - To search against the ``location``: + To search against the `location`: - - Use a field query. Example: ``location:us-west*`` - - Use a free text query. Example: ``us-west*`` + * Use a field query. Example: + `location:us-west*` * Use a free text query. + Example: `us-west*` labels (MutableMapping[str, str]): - Labels associated with this resource. See `Labelling and - grouping Google Cloud - resources `__ - for more information. This field is available only when the - resource's Protobuf contains it. - - To search against the ``labels``: + Labels associated with this resource. See + [Labelling and grouping Google Cloud + resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + for more information. This field is available + only when the resource's Protobuf contains it. - - Use a field query: + To search against the `labels`: - - query on any label's key or value. Example: - ``labels:prod`` - - query by a given label. Example: ``labels.env:prod`` - - query by a given label's existence. Example: - ``labels.env:*`` + * Use a field query: - - Use a free text query. Example: ``prod`` + - query on any label's key or value. + Example: `labels:prod` + - query by a given label. Example: + `labels.env:prod` + - query by a given label's existence. + Example: `labels.env:*` * Use a free text + query. Example: `prod` network_tags (MutableSequence[str]): - Network tags associated with this resource. Like labels, - network tags are a type of annotations used to group Google - Cloud resources. See `Labelling Google Cloud - resources `__ - for more information. This field is available only when the - resource's Protobuf contains it. + Network tags associated with this resource. + Like labels, network tags are a type of + annotations used to group Google Cloud + resources. See [Labelling Google Cloud + resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + for more information. This field is available + only when the resource's Protobuf contains it. - To search against the ``network_tags``: + To search against the `network_tags`: - - Use a field query. Example: ``networkTags:internal`` - - Use a free text query. Example: ``internal`` + * Use a field query. Example: + `networkTags:internal` * Use a free text query. + Example: `internal` kms_key (str): The Cloud KMS - `CryptoKey `__ + [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) name or - `CryptoKeyVersion `__ + [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) name. - This field only presents for the purpose of backward - compatibility. Please use the ``kms_keys`` field to retrieve - Cloud KMS key information. This field is available only when - the resource's Protobuf contains it and will only be - populated for `these resource - types `__ + This field only presents for the purpose of + backward compatibility. Please use the + `kms_keys` field to retrieve Cloud KMS key + information. This field is available only when + the resource's Protobuf contains it and will + only be populated for [these resource + types](https://cloud.google.com/asset-inventory/docs/legacy-field-names#resource_types_with_the_to_be_deprecated_kmskey_field) for backward compatible purposes. - To search against the ``kms_key``: + To search against the `kms_key`: - - Use a field query. Example: ``kmsKey:key`` - - Use a free text query. Example: ``key`` + * Use a field query. Example: `kmsKey:key` + * Use a free text query. Example: `key` kms_keys (MutableSequence[str]): The Cloud KMS - `CryptoKey `__ + [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) names or - `CryptoKeyVersion `__ - names. This field is available only when the resource's - Protobuf contains it. + [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) + names. This field is available only when the + resource's Protobuf contains it. - To search against the ``kms_keys``: + To search against the `kms_keys`: - - Use a field query. Example: ``kmsKeys:key`` - - Use a free text query. Example: ``key`` + * Use a field query. Example: `kmsKeys:key` + * Use a free text query. Example: `key` create_time (google.protobuf.timestamp_pb2.Timestamp): - The create timestamp of this resource, at which the resource - was created. The granularity is in seconds. Timestamp.nanos - will always be 0. This field is available only when the - resource's Protobuf contains it. - - To search against ``create_time``: + The create timestamp of this resource, at + which the resource was created. The granularity + is in seconds. Timestamp.nanos will always be 0. + This field is available only when the resource's + Protobuf contains it. - - Use a field query. + To search against `create_time`: - - value in seconds since unix epoch. Example: - ``createTime > 1609459200`` - - value in date string. Example: - ``createTime > 2021-01-01`` - - value in date-time string (must be quoted). Example: - ``createTime > "2021-01-01T00:00:00"`` + * Use a field query. + - value in seconds since unix epoch. + Example: `createTime > 1609459200` + - value in date string. Example: `createTime + > 2021-01-01` + - value in date-time string (must be + quoted). Example: `createTime > + "2021-01-01T00:00:00"` update_time (google.protobuf.timestamp_pb2.Timestamp): - The last update timestamp of this resource, at which the - resource was last modified or deleted. The granularity is in - seconds. Timestamp.nanos will always be 0. This field is - available only when the resource's Protobuf contains it. - - To search against ``update_time``: - - - Use a field query. - - - value in seconds since unix epoch. Example: - ``updateTime < 1609459200`` - - value in date string. Example: - ``updateTime < 2021-01-01`` - - value in date-time string (must be quoted). Example: - ``updateTime < "2021-01-01T00:00:00"`` + The last update timestamp of this resource, + at which the resource was last modified or + deleted. The granularity is in seconds. + Timestamp.nanos will always be 0. This field is + available only when the resource's Protobuf + contains it. + + To search against `update_time`: + + * Use a field query. + - value in seconds since unix epoch. + Example: `updateTime < 1609459200` + - value in date string. Example: `updateTime + < 2021-01-01` + - value in date-time string (must be + quoted). Example: `updateTime < + "2021-01-01T00:00:00"` state (str): - The state of this resource. Different resources types have - different state definitions that are mapped from various - fields of different resource types. This field is available - only when the resource's Protobuf contains it. + The state of this resource. Different + resources types have different state definitions + that are mapped from various fields of different + resource types. This field is available only + when the resource's Protobuf contains it. - Example: If the resource is an instance provided by Compute - Engine, its state will include PROVISIONING, STAGING, - RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and - TERMINATED. See ``status`` definition in `API - Reference `__. - If the resource is a project provided by Resource Manager, - its state will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, + Example: + + If the resource is an instance provided by + Compute Engine, its state will include + PROVISIONING, STAGING, RUNNING, STOPPING, + SUSPENDING, SUSPENDED, REPAIRING, and + TERMINATED. See `status` definition in [API + Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances). + If the resource is a project provided by + Resource Manager, its state will include + LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and DELETE_IN_PROGRESS. See - ``lifecycleState`` definition in `API - Reference `__. + `lifecycleState` definition in [API + Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects). - To search against the ``state``: + To search against the `state`: - - Use a field query. Example: ``state:RUNNING`` - - Use a free text query. Example: ``RUNNING`` + * Use a field query. Example: `state:RUNNING` * + Use a free text query. Example: `RUNNING` additional_attributes (google.protobuf.struct_pb2.Struct): - The additional searchable attributes of this resource. The - attributes may vary from one resource type to another. - Examples: ``projectId`` for Project, ``dnsName`` for DNS - ManagedZone. This field contains a subset of the resource - metadata fields that are returned by the List or Get APIs - provided by the corresponding Google Cloud service (e.g., - Compute Engine). see `API references and supported - searchable - attributes `__ + The additional searchable attributes of this + resource. The attributes may vary from one + resource type to another. Examples: `projectId` + for Project, `dnsName` for DNS ManagedZone. This + field contains a subset of the resource metadata + fields that are returned by the List or Get APIs + provided by the corresponding Google Cloud + service (e.g., Compute Engine). see [API + references and supported searchable + attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) to see which fields are included. - You can search values of these fields through free text - search. However, you should not consume the field - programically as the field names and values may change as - the Google Cloud service updates to a new incompatible API + You can search values of these fields through + free text search. However, you should not + consume the field programically as the field + names and values may change as the Google Cloud + service updates to a new incompatible API version. - To search against the ``additional_attributes``: + To search against the `additional_attributes`: - - Use a free text query to match the attributes values. - Example: to search - ``additional_attributes = { dnsName: "foobar" }``, you can - issue a query ``foobar``. + * Use a free text query to match the attributes + values. Example: to search + `additional_attributes = { dnsName: "foobar" }`, + you can issue a query `foobar`. parent_full_resource_name (str): - The full resource name of this resource's parent, if it has - one. To search against the ``parent_full_resource_name``: + The full resource name of this resource's + parent, if it has one. To search against the + `parent_full_resource_name`: + + * Use a field query. Example: - - Use a field query. Example: - ``parentFullResourceName:"project-name"`` - - Use a free text query. Example: ``project-name`` + `parentFullResourceName:"project-name"` + * Use a free text query. Example: + + `project-name` versioned_resources (MutableSequence[google.cloud.asset_v1.types.VersionedResource]): - Versioned resource representations of this resource. This is - repeated because there could be multiple versions of - resource representations during version migration. - - This ``versioned_resources`` field is not searchable. Some - attributes of the resource representations are exposed in - ``additional_attributes`` field, so as to allow users to - search on them. + Versioned resource representations of this + resource. This is repeated because there could + be multiple versions of resource representations + during version migration. + + This `versioned_resources` field is not + searchable. Some attributes of the resource + representations are exposed in + `additional_attributes` field, so as to allow + users to search on them. attached_resources (MutableSequence[google.cloud.asset_v1.types.AttachedResource]): - Attached resources of this resource. For example, an - OSConfig Inventory is an attached resource of a Compute - Instance. This field is repeated because a resource could - have multiple attached resources. - - This ``attached_resources`` field is not searchable. Some - attributes of the attached resources are exposed in - ``additional_attributes`` field, so as to allow users to - search on them. + Attached resources of this resource. For + example, an OSConfig Inventory is an attached + resource of a Compute Instance. This field is + repeated because a resource could have multiple + attached resources. + + This `attached_resources` field is not + searchable. Some attributes of the attached + resources are exposed in `additional_attributes` + field, so as to allow users to search on them. relationships (MutableMapping[str, google.cloud.asset_v1.types.RelatedResources]): - A map of related resources of this resource, keyed by the - relationship type. A relationship type is in the format of - {SourceType}\ *{ACTION}*\ {DestType}. Example: - ``DISK_TO_INSTANCE``, ``DISK_TO_NETWORK``, - ``INSTANCE_TO_INSTANCEGROUP``. See `supported relationship - types `__. + A map of related resources of this resource, + keyed by the relationship type. A relationship + type is in the format of + {SourceType}_{ACTION}_{DestType}. Example: + `DISK_TO_INSTANCE`, `DISK_TO_NETWORK`, + `INSTANCE_TO_INSTANCEGROUP`. See [supported + relationship + types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types). tag_keys (MutableSequence[str]): TagKey namespaced names, in the format of - {ORG_ID}/{TAG_KEY_SHORT_NAME}. To search against the - ``tagKeys``: + {ORG_ID}/{TAG_KEY_SHORT_NAME}. To search against + the `tagKeys`: - - Use a field query. Example: + * Use a field query. Example: - - ``tagKeys:"123456789/env*"`` - - ``tagKeys="123456789/env"`` - - ``tagKeys:"env"`` + - `tagKeys:"123456789/env*"` + - `tagKeys="123456789/env"` + - `tagKeys:"env"` - - Use a free text query. Example: + * Use a free text query. Example: - - ``env`` + - `env` tag_values (MutableSequence[str]): TagValue namespaced names, in the format of - {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. To - search against the ``tagValues``: + {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. + To search against the `tagValues`: - - Use a field query. Example: + * Use a field query. Example: - - ``tagValues:"env"`` - - ``tagValues:"env/prod"`` - - ``tagValues:"123456789/env/prod*"`` - - ``tagValues="123456789/env/prod"`` + - `tagValues:"env"` + - `tagValues:"env/prod"` + - `tagValues:"123456789/env/prod*"` + - `tagValues="123456789/env/prod"` - - Use a free text query. Example: + * Use a free text query. Example: - - ``prod`` + - `prod` tag_value_ids (MutableSequence[str]): - TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}. To - search against the ``tagValueIds``: + TagValue IDs, in the format of + tagValues/{TAG_VALUE_ID}. To search against the + `tagValueIds`: - - Use a field query. Example: + * Use a field query. Example: - - ``tagValueIds:"456"`` - - ``tagValueIds="tagValues/456"`` + - `tagValueIds:"456"` + - `tagValueIds="tagValues/456"` - - Use a free text query. Example: + * Use a free text query. Example: - - ``456`` + - `456` parent_asset_type (str): - The type of this resource's immediate parent, if there is - one. + The type of this resource's immediate parent, + if there is one. + To search against the `parent_asset_type`: - To search against the ``parent_asset_type``: + * Use a field query. Example: - - Use a field query. Example: - ``parentAssetType:"cloudresourcemanager.googleapis.com/Project"`` - - Use a free text query. Example: - ``cloudresourcemanager.googleapis.com/Project`` + `parentAssetType:"cloudresourcemanager.googleapis.com/Project"` + * Use a free text query. Example: + + `cloudresourcemanager.googleapis.com/Project` """ name: str = proto.Field( @@ -930,22 +982,30 @@ class VersionedResource(proto.Message): version (str): API version of the resource. - Example: If the resource is an instance provided by Compute - Engine v1 API as defined in - ``https://cloud.google.com/compute/docs/reference/rest/v1/instances``, + Example: + + If the resource is an instance provided by + Compute Engine v1 API as defined in + `https://cloud.google.com/compute/docs/reference/rest/v1/instances`, version will be "v1". resource (google.protobuf.struct_pb2.Struct): - JSON representation of the resource as defined by the - corresponding service providing this resource. + JSON representation of the resource as + defined by the corresponding service providing + this resource. + + Example: - Example: If the resource is an instance provided by Compute - Engine, this field will contain the JSON representation of - the instance as defined by Compute Engine: - ``https://cloud.google.com/compute/docs/reference/rest/v1/instances``. + If the resource is an instance provided by + Compute Engine, this field will contain the JSON + representation of the instance as defined by + Compute Engine: - You can find the resource definition for each supported - resource type in this table: - ``https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`` + `https://cloud.google.com/compute/docs/reference/rest/v1/instances`. + + You can find the resource definition for each + supported resource type in this table: + + `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types` """ version: str = proto.Field( @@ -968,11 +1028,12 @@ class AttachedResource(proto.Message): asset_type (str): The type of this attached resource. - Example: ``osconfig.googleapis.com/Inventory`` + Example: `osconfig.googleapis.com/Inventory` - You can find the supported attached asset types of each - resource in this table: - ``https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`` + You can find the supported attached asset types + of each resource in this table: + + `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types` versioned_resources (MutableSequence[google.cloud.asset_v1.types.VersionedResource]): Versioned resource representations of this attached resource. This is repeated because @@ -1014,10 +1075,11 @@ class RelatedResource(proto.Message): Attributes: asset_type (str): The type of the asset. Example: - ``compute.googleapis.com/Instance`` + `compute.googleapis.com/Instance` full_resource_name (str): - The full resource name of the related resource. Example: - ``//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`` + The full resource name of the related + resource. Example: + `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123` """ asset_type: str = proto.Field( @@ -1036,75 +1098,91 @@ class IamPolicySearchResult(proto.Message): Attributes: resource (str): - The full resource name of the resource associated with this - IAM policy. Example: - ``//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1``. - See `Cloud Asset Inventory Resource Name - Format `__ + The full resource name of the resource + associated with this IAM policy. Example: + + `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + See [Cloud Asset Inventory Resource Name + Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) for more information. - To search against the ``resource``: + To search against the `resource`: - - use a field query. Example: ``resource:organizations/123`` + * use a field query. Example: + `resource:organizations/123` asset_type (str): - The type of the resource associated with this IAM policy. - Example: ``compute.googleapis.com/Disk``. + The type of the resource associated with this + IAM policy. Example: + `compute.googleapis.com/Disk`. - To search against the ``asset_type``: + To search against the `asset_type`: - - specify the ``asset_types`` field in your search request. + * specify the `asset_types` field in your search + request. project (str): - The project that the associated Google Cloud resource - belongs to, in the form of projects/{PROJECT_NUMBER}. If an - IAM policy is set on a resource (like VM instance, Cloud - Storage bucket), the project field will indicate the project - that contains the resource. If an IAM policy is set on a - folder or orgnization, this field will be empty. - - To search against the ``project``: - - - specify the ``scope`` field as this project in your search - request. + The project that the associated Google Cloud + resource belongs to, in the form of + projects/{PROJECT_NUMBER}. If an IAM policy is + set on a resource (like VM instance, Cloud + Storage bucket), the project field will indicate + the project that contains the resource. If an + IAM policy is set on a folder or orgnization, + this field will be empty. + + To search against the `project`: + + * specify the `scope` field as this project in + your search request. folders (MutableSequence[str]): - The folder(s) that the IAM policy belongs to, in the form of - folders/{FOLDER_NUMBER}. This field is available when the - IAM policy belongs to one or more folders. + The folder(s) that the IAM policy belongs to, + in the form of folders/{FOLDER_NUMBER}. This + field is available when the IAM policy belongs + to one or more folders. - To search against ``folders``: + To search against `folders`: - - use a field query. Example: ``folders:(123 OR 456)`` - - use a free text query. Example: ``123`` - - specify the ``scope`` field as this folder in your search - request. + * use a field query. Example: `folders:(123 OR + 456)` * use a free text query. Example: `123` + * specify the `scope` field as this folder in + your search request. organization (str): - The organization that the IAM policy belongs to, in the form - of organizations/{ORGANIZATION_NUMBER}. This field is - available when the IAM policy belongs to an organization. + The organization that the IAM policy belongs + to, in the form of + organizations/{ORGANIZATION_NUMBER}. This field + is available when the IAM policy belongs to an + organization. + + To search against `organization`: + + * use a field query. Example: `organization:123` + * use a free text query. Example: `123` + * specify the `scope` field as this organization + in your search request. + policy (google.iam.v1.policy_pb2.Policy): + The IAM policy directly set on the given + resource. Note that the original IAM policy can + contain multiple bindings. This only contains + the bindings that match the given query. For + queries that don't contain a constrain on + policies (e.g., an empty query), this contains + all the bindings. - To search against ``organization``: + To search against the `policy` bindings: - - use a field query. Example: ``organization:123`` - - use a free text query. Example: ``123`` - - specify the ``scope`` field as this organization in your - search request. - policy (google.iam.v1.policy_pb2.Policy): - The IAM policy directly set on the given resource. Note that - the original IAM policy can contain multiple bindings. This - only contains the bindings that match the given query. For - queries that don't contain a constrain on policies (e.g., an - empty query), this contains all the bindings. - - To search against the ``policy`` bindings: - - - use a field query: - - - query by the policy contained members. Example: - ``policy:amy@gmail.com`` - - query by the policy contained roles. Example: - ``policy:roles/compute.admin`` - - query by the policy contained roles' included - permissions. Example: - ``policy.role.permissions:compute.instances.create`` + * use a field query: + + - query by the policy contained members. + Example: + + `policy:amy@gmail.com` + - query by the policy contained roles. + Example: + + `policy:roles/compute.admin` + - query by the policy contained roles' + included permissions. Example: + + `policy.role.permissions:compute.instances.create` explanation (google.cloud.asset_v1.types.IamPolicySearchResult.Explanation): Explanation about the IAM policy search result. It contains additional information to @@ -1116,16 +1194,17 @@ class Explanation(proto.Message): Attributes: matched_permissions (MutableMapping[str, google.cloud.asset_v1.types.IamPolicySearchResult.Explanation.Permissions]): - The map from roles to their included permissions that match - the permission query (i.e., a query containing - ``policy.role.permissions:``). Example: if query - ``policy.role.permissions:compute.disk.get`` matches a - policy binding that contains owner role, the - matched_permissions will be - ``{"roles/owner": ["compute.disk.get"]}``. The roles can - also be found in the returned ``policy`` bindings. Note that - the map is populated only for requests with permission - queries. + The map from roles to their included + permissions that match the permission query + (i.e., a query containing + `policy.role.permissions:`). Example: if query + `policy.role.permissions:compute.disk.get` + matches a policy binding that contains owner + role, the matched_permissions will be + `{"roles/owner": ["compute.disk.get"]}`. The + roles can also be found in the returned `policy` + bindings. Note that the map is populated only + for requests with permission queries. """ class Permissions(proto.Message): @@ -1133,8 +1212,8 @@ class Permissions(proto.Message): Attributes: permissions (MutableSequence[str]): - A list of permissions. A sample permission string: - ``compute.disk.get``. + A list of permissions. A sample permission + string: `compute.disk.get`. """ permissions: MutableSequence[str] = proto.RepeatedField( @@ -1187,15 +1266,15 @@ class IamPolicyAnalysisState(proto.Message): Attributes: code (google.rpc.code_pb2.Code): - The Google standard error code that best describes the - state. For example: - - - OK means the analysis on this entity has been successfully - finished; - - PERMISSION_DENIED means an access denied error is - encountered; - - DEADLINE_EXCEEDED means the analysis on this entity hasn't - been started in time; + The Google standard error code that best + describes the state. For example: + + - OK means the analysis on this entity has been + successfully finished; + - PERMISSION_DENIED means an access denied error + is encountered; + - DEADLINE_EXCEEDED means the analysis on this + entity hasn't been started in time; cause (str): The human-readable description of the cause of failure. @@ -1226,13 +1305,14 @@ class EvaluationValue(proto.Enum): EVALUATION_VALUE_UNSPECIFIED (0): Reserved for future use. TRUE (1): - The evaluation result is ``true``. + The evaluation result is `true`. FALSE (2): - The evaluation result is ``false``. + The evaluation result is `false`. CONDITIONAL (3): - The evaluation result is ``conditional`` when the condition - expression contains variables that are either missing input - values or have not been supported by Analyzer yet. + The evaluation result is `conditional` when + the condition expression contains variables that + are either missing input values or have not been + supported by Analyzer yet. """ EVALUATION_VALUE_UNSPECIFIED = 0 TRUE = 1 @@ -1252,8 +1332,8 @@ class IamPolicyAnalysisResult(proto.Message): Attributes: attached_resource_full_name (str): - The `full resource - name `__ + The [full resource + name](https://cloud.google.com/asset-inventory/docs/resource-name-format) of the resource to which the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches. @@ -1262,13 +1342,13 @@ class IamPolicyAnalysisResult(proto.Message): access_control_lists (MutableSequence[google.cloud.asset_v1.types.IamPolicyAnalysisResult.AccessControlList]): The access control lists derived from the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] - that match or potentially match resource and access - selectors specified in the request. + that match or potentially match resource and + access selectors specified in the request. identity_list (google.cloud.asset_v1.types.IamPolicyAnalysisResult.IdentityList): The identity list derived from members of the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] - that match or potentially match identity selector specified - in the request. + that match or potentially match identity + selector specified in the request. fully_explored (bool): Represents whether all analyses on the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] @@ -1280,8 +1360,8 @@ class Resource(proto.Message): Attributes: full_resource_name (str): - The `full resource - name `__ + The [full resource + name](https://cloud.google.com/asset-inventory/docs/resource-name-format) analysis_state (google.cloud.asset_v1.types.IamPolicyAnalysisState): The analysis state of this resource. """ @@ -1340,9 +1420,9 @@ class Identity(proto.Message): Attributes: name (str): - The identity name in any form of members appear in `IAM - policy - binding `__, + The identity name in any form of members + appear in [IAM policy + binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such as: - user:foo@google.com @@ -1390,16 +1470,17 @@ class Edge(proto.Message): ) class AccessControlList(proto.Message): - r"""An access control list, derived from the above IAM policy binding, - which contains a set of resources and accesses. May include one item - from each set to compose an access control entry. + r"""An access control list, derived from the above IAM policy + binding, which contains a set of resources and accesses. May + include one item from each set to compose an access control + entry. - NOTICE that there could be multiple access control lists for one IAM - policy binding. The access control lists are created based on - resource and access combinations. + NOTICE that there could be multiple access control lists for one + IAM policy binding. The access control lists are created based + on resource and access combinations. - For example, assume we have the following cases in one IAM policy - binding: + For example, assume we have the following cases in one IAM + policy binding: - Permission P1 and P2 apply to resource R1 and R2; - Permission P3 applies to resource R2 and R3; @@ -1411,26 +1492,33 @@ class AccessControlList(proto.Message): Attributes: resources (MutableSequence[google.cloud.asset_v1.types.IamPolicyAnalysisResult.Resource]): - The resources that match one of the following conditions: + The resources that match one of the following + conditions: - - The resource_selector, if it is specified in request; - - Otherwise, resources reachable from the policy attached - resource. + - The resource_selector, if it is specified in + request; + - Otherwise, resources reachable from the policy + attached resource. accesses (MutableSequence[google.cloud.asset_v1.types.IamPolicyAnalysisResult.Access]): - The accesses that match one of the following conditions: + The accesses that match one of the following + conditions: - - The access_selector, if it is specified in request; - - Otherwise, access specifiers reachable from the policy - binding's role. + - The access_selector, if it is specified in + request; + - Otherwise, access specifiers reachable from + the policy binding's role. resource_edges (MutableSequence[google.cloud.asset_v1.types.IamPolicyAnalysisResult.Edge]): - Resource edges of the graph starting from the policy - attached resource to any descendant resources. The + Resource edges of the graph starting from the + policy attached resource to any descendant + resources. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] - contains the full resource name of a parent resource and + contains the full resource name of a parent + resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node] - contains the full resource name of a child resource. This - field is present only if the output_resource_edges option is - enabled in request. + contains the full resource name of a child + resource. This field is present only if the + output_resource_edges option is enabled in + request. condition_evaluation (google.cloud.asset_v1.types.ConditionEvaluation): Condition evaluation for this AccessControlList, if there is a condition @@ -1463,24 +1551,28 @@ class IdentityList(proto.Message): Attributes: identities (MutableSequence[google.cloud.asset_v1.types.IamPolicyAnalysisResult.Identity]): - Only the identities that match one of the following - conditions will be presented: + Only the identities that match one of the + following conditions will be presented: - - The identity_selector, if it is specified in request; - - Otherwise, identities reachable from the policy binding's - members. + - The identity_selector, if it is specified in + request; + - Otherwise, identities reachable from the + policy binding's members. group_edges (MutableSequence[google.cloud.asset_v1.types.IamPolicyAnalysisResult.Edge]): - Group identity edges of the graph starting from the - binding's group members to any node of the + Group identity edges of the graph starting + from the binding's group members to any node of + the [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] - contains a group, such as ``group:parent@google.com``. The + contains a group, such as + `group:parent@google.com`. The [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node] contains a member of the group, such as - ``group:child@google.com`` or ``user:foo@google.com``. This - field is present only if the output_group_edges option is - enabled in request. + `group:child@google.com` or + `user:foo@google.com`. This field is present + only if the output_group_edges option is enabled + in request. """ identities: MutableSequence['IamPolicyAnalysisResult.Identity'] = proto.RepeatedField( diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py index eac708473c..84273dee8e 100755 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py @@ -306,30 +306,39 @@ async def sample_generate_access_token(): request (Optional[Union[google.iam.credentials_v1.types.GenerateAccessTokenRequest, dict]]): The request object. name (:class:`str`): - Required. The resource name of the service account for - which the credentials are requested, in the following - format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + Required. The resource name of the + service account for which the + credentials are requested, in the + following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. delegates (:class:`MutableSequence[str]`): - The sequence of service accounts in a delegation chain. - Each service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its - next service account in the chain. The last service - account in the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the - service account that is specified in the ``name`` field - of the request. - - The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + The sequence of service accounts in a + delegation chain. Each service account + must be granted the + `roles/iam.serviceAccountTokenCreator` + role on its next service account in the + chain. The last service account in the + chain must be granted the + `roles/iam.serviceAccountTokenCreator` + role on the service account that is + specified in the `name` field of the + request. + + The delegates must have the following + format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``delegates`` field on the ``request`` instance; if ``request`` is provided, this @@ -464,30 +473,39 @@ async def sample_generate_id_token(): request (Optional[Union[google.iam.credentials_v1.types.GenerateIdTokenRequest, dict]]): The request object. name (:class:`str`): - Required. The resource name of the service account for - which the credentials are requested, in the following - format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + Required. The resource name of the + service account for which the + credentials are requested, in the + following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. delegates (:class:`MutableSequence[str]`): - The sequence of service accounts in a delegation chain. - Each service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its - next service account in the chain. The last service - account in the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the - service account that is specified in the ``name`` field - of the request. - - The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + The sequence of service accounts in a + delegation chain. Each service account + must be granted the + `roles/iam.serviceAccountTokenCreator` + role on its next service account in the + chain. The last service account in the + chain must be granted the + `roles/iam.serviceAccountTokenCreator` + role on the service account that is + specified in the `name` field of the + request. + + The delegates must have the following + format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``delegates`` field on the ``request`` instance; if ``request`` is provided, this @@ -501,9 +519,10 @@ async def sample_generate_id_token(): on the ``request`` instance; if ``request`` is provided, this should not be set. include_email (:class:`bool`): - Include the service account email in the token. If set - to ``true``, the token will contain ``email`` and - ``email_verified`` claims. + Include the service account email in + the token. If set to `true`, the token + will contain `email` and + `email_verified` claims. This corresponds to the ``include_email`` field on the ``request`` instance; if ``request`` is provided, this @@ -615,30 +634,39 @@ async def sample_sign_blob(): request (Optional[Union[google.iam.credentials_v1.types.SignBlobRequest, dict]]): The request object. name (:class:`str`): - Required. The resource name of the service account for - which the credentials are requested, in the following - format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + Required. The resource name of the + service account for which the + credentials are requested, in the + following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. delegates (:class:`MutableSequence[str]`): - The sequence of service accounts in a delegation chain. - Each service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its - next service account in the chain. The last service - account in the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the - service account that is specified in the ``name`` field - of the request. - - The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + The sequence of service accounts in a + delegation chain. Each service account + must be granted the + `roles/iam.serviceAccountTokenCreator` + role on its next service account in the + chain. The last service account in the + chain must be granted the + `roles/iam.serviceAccountTokenCreator` + role on the service account that is + specified in the `name` field of the + request. + + The delegates must have the following + format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``delegates`` field on the ``request`` instance; if ``request`` is provided, this @@ -753,30 +781,39 @@ async def sample_sign_jwt(): request (Optional[Union[google.iam.credentials_v1.types.SignJwtRequest, dict]]): The request object. name (:class:`str`): - Required. The resource name of the service account for - which the credentials are requested, in the following - format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + Required. The resource name of the + service account for which the + credentials are requested, in the + following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. delegates (:class:`MutableSequence[str]`): - The sequence of service accounts in a delegation chain. - Each service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its - next service account in the chain. The last service - account in the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the - service account that is specified in the ``name`` field - of the request. - - The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + The sequence of service accounts in a + delegation chain. Each service account + must be granted the + `roles/iam.serviceAccountTokenCreator` + role on its next service account in the + chain. The last service account in the + chain must be granted the + `roles/iam.serviceAccountTokenCreator` + role on the service account that is + specified in the `name` field of the + request. + + The delegates must have the following + format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``delegates`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py index 6eb63b8a4f..c0aa652a00 100755 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py @@ -655,30 +655,39 @@ def sample_generate_access_token(): request (Union[google.iam.credentials_v1.types.GenerateAccessTokenRequest, dict]): The request object. name (str): - Required. The resource name of the service account for - which the credentials are requested, in the following - format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + Required. The resource name of the + service account for which the + credentials are requested, in the + following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. delegates (MutableSequence[str]): - The sequence of service accounts in a delegation chain. - Each service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its - next service account in the chain. The last service - account in the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the - service account that is specified in the ``name`` field - of the request. - - The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + The sequence of service accounts in a + delegation chain. Each service account + must be granted the + `roles/iam.serviceAccountTokenCreator` + role on its next service account in the + chain. The last service account in the + chain must be granted the + `roles/iam.serviceAccountTokenCreator` + role on the service account that is + specified in the `name` field of the + request. + + The delegates must have the following + format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``delegates`` field on the ``request`` instance; if ``request`` is provided, this @@ -812,30 +821,39 @@ def sample_generate_id_token(): request (Union[google.iam.credentials_v1.types.GenerateIdTokenRequest, dict]): The request object. name (str): - Required. The resource name of the service account for - which the credentials are requested, in the following - format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + Required. The resource name of the + service account for which the + credentials are requested, in the + following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. delegates (MutableSequence[str]): - The sequence of service accounts in a delegation chain. - Each service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its - next service account in the chain. The last service - account in the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the - service account that is specified in the ``name`` field - of the request. - - The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + The sequence of service accounts in a + delegation chain. Each service account + must be granted the + `roles/iam.serviceAccountTokenCreator` + role on its next service account in the + chain. The last service account in the + chain must be granted the + `roles/iam.serviceAccountTokenCreator` + role on the service account that is + specified in the `name` field of the + request. + + The delegates must have the following + format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``delegates`` field on the ``request`` instance; if ``request`` is provided, this @@ -849,9 +867,10 @@ def sample_generate_id_token(): on the ``request`` instance; if ``request`` is provided, this should not be set. include_email (bool): - Include the service account email in the token. If set - to ``true``, the token will contain ``email`` and - ``email_verified`` claims. + Include the service account email in + the token. If set to `true`, the token + will contain `email` and + `email_verified` claims. This corresponds to the ``include_email`` field on the ``request`` instance; if ``request`` is provided, this @@ -962,30 +981,39 @@ def sample_sign_blob(): request (Union[google.iam.credentials_v1.types.SignBlobRequest, dict]): The request object. name (str): - Required. The resource name of the service account for - which the credentials are requested, in the following - format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + Required. The resource name of the + service account for which the + credentials are requested, in the + following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. delegates (MutableSequence[str]): - The sequence of service accounts in a delegation chain. - Each service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its - next service account in the chain. The last service - account in the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the - service account that is specified in the ``name`` field - of the request. - - The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + The sequence of service accounts in a + delegation chain. Each service account + must be granted the + `roles/iam.serviceAccountTokenCreator` + role on its next service account in the + chain. The last service account in the + chain must be granted the + `roles/iam.serviceAccountTokenCreator` + role on the service account that is + specified in the `name` field of the + request. + + The delegates must have the following + format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``delegates`` field on the ``request`` instance; if ``request`` is provided, this @@ -1099,30 +1127,39 @@ def sample_sign_jwt(): request (Union[google.iam.credentials_v1.types.SignJwtRequest, dict]): The request object. name (str): - Required. The resource name of the service account for - which the credentials are requested, in the following - format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + Required. The resource name of the + service account for which the + credentials are requested, in the + following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. delegates (MutableSequence[str]): - The sequence of service accounts in a delegation chain. - Each service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its - next service account in the chain. The last service - account in the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the - service account that is specified in the ``name`` field - of the request. - - The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it - with a project ID is invalid. + The sequence of service accounts in a + delegation chain. Each service account + must be granted the + `roles/iam.serviceAccountTokenCreator` + role on its next service account in the + chain. The last service account in the + chain must be granted the + `roles/iam.serviceAccountTokenCreator` + role on the service account that is + specified in the `name` field of the + request. + + The delegates must have the following + format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is + invalid. This corresponds to the ``delegates`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/types/common.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/types/common.py index f267a4b7a5..b1287422d4 100755 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/types/common.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/types/common.py @@ -43,25 +43,29 @@ class GenerateAccessTokenRequest(proto.Message): Attributes: name (str): - Required. The resource name of the service account for which - the credentials are requested, in the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it with - a project ID is invalid. + Required. The resource name of the service + account for which the credentials are requested, + in the following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is invalid. delegates (MutableSequence[str]): - The sequence of service accounts in a delegation chain. Each - service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its next - service account in the chain. The last service account in - the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the service - account that is specified in the ``name`` field of the - request. + The sequence of service accounts in a + delegation chain. Each service account must be + granted the + `roles/iam.serviceAccountTokenCreator` role on + its next service account in the chain. The last + service account in the chain must be granted the + `roles/iam.serviceAccountTokenCreator` role on + the service account that is specified in the + `name` field of the request. The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it with - a project ID is invalid. + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is invalid. scope (MutableSequence[str]): Required. Code to identify the scopes to be included in the OAuth 2.0 access token. See @@ -122,25 +126,29 @@ class SignBlobRequest(proto.Message): Attributes: name (str): - Required. The resource name of the service account for which - the credentials are requested, in the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it with - a project ID is invalid. + Required. The resource name of the service + account for which the credentials are requested, + in the following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is invalid. delegates (MutableSequence[str]): - The sequence of service accounts in a delegation chain. Each - service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its next - service account in the chain. The last service account in - the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the service - account that is specified in the ``name`` field of the - request. + The sequence of service accounts in a + delegation chain. Each service account must be + granted the + `roles/iam.serviceAccountTokenCreator` role on + its next service account in the chain. The last + service account in the chain must be granted the + `roles/iam.serviceAccountTokenCreator` role on + the service account that is specified in the + `name` field of the request. The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it with - a project ID is invalid. + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is invalid. payload (bytes): Required. The bytes to sign. """ @@ -184,25 +192,29 @@ class SignJwtRequest(proto.Message): Attributes: name (str): - Required. The resource name of the service account for which - the credentials are requested, in the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it with - a project ID is invalid. + Required. The resource name of the service + account for which the credentials are requested, + in the following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is invalid. delegates (MutableSequence[str]): - The sequence of service accounts in a delegation chain. Each - service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its next - service account in the chain. The last service account in - the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the service - account that is specified in the ``name`` field of the - request. + The sequence of service accounts in a + delegation chain. Each service account must be + granted the + `roles/iam.serviceAccountTokenCreator` role on + its next service account in the chain. The last + service account in the chain must be granted the + `roles/iam.serviceAccountTokenCreator` role on + the service account that is specified in the + `name` field of the request. The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it with - a project ID is invalid. + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is invalid. payload (str): Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. @@ -247,33 +259,37 @@ class GenerateIdTokenRequest(proto.Message): Attributes: name (str): - Required. The resource name of the service account for which - the credentials are requested, in the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it with - a project ID is invalid. + Required. The resource name of the service + account for which the credentials are requested, + in the following format: + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is invalid. delegates (MutableSequence[str]): - The sequence of service accounts in a delegation chain. Each - service account must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on its next - service account in the chain. The last service account in - the chain must be granted the - ``roles/iam.serviceAccountTokenCreator`` role on the service - account that is specified in the ``name`` field of the - request. + The sequence of service accounts in a + delegation chain. Each service account must be + granted the + `roles/iam.serviceAccountTokenCreator` role on + its next service account in the chain. The last + service account in the chain must be granted the + `roles/iam.serviceAccountTokenCreator` role on + the service account that is specified in the + `name` field of the request. The delegates must have the following format: - ``projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}``. - The ``-`` wildcard character is required; replacing it with - a project ID is invalid. + + `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. + The `-` wildcard character is required; + replacing it with a project ID is invalid. audience (str): Required. The audience for the token, such as the API or account that this token grants access to. include_email (bool): - Include the service account email in the token. If set to - ``true``, the token will contain ``email`` and - ``email_verified`` claims. + Include the service account email in the + token. If set to `true`, the token will contain + `email` and `email_verified` claims. """ name: str = proto.Field( diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py index 09b53be781..56293ea1c5 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py @@ -452,10 +452,11 @@ async def sample_list_triggers(): Returns: google.cloud.eventarc_v1.services.eventarc.pagers.ListTriggersAsyncPager: - The response message for the ListTriggers method. - - Iterating over this object will yield results and - resolve additional pages automatically. + The response message for the + `ListTriggers` method. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -600,11 +601,13 @@ async def sample_create_trigger(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.eventarc_v1.types.Trigger` A - representation of the trigger resource. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Trigger` + A representation of the trigger + resource. """ # Create or coerce a protobuf request object. @@ -716,18 +719,21 @@ async def sample_update_trigger(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - The fields to be updated; only fields explicitly - provided are updated. If no field mask is provided, all - provided fields in the request are updated. To update - all fields, provide a field mask of "\*". + The fields to be updated; only fields + explicitly provided are updated. If no + field mask is provided, all provided + fields in the request are updated. To + update all fields, provide a field mask + of "*". This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. allow_missing (:class:`bool`): - If set to true, and the trigger is not found, a new - trigger will be created. In this situation, - ``update_mask`` is ignored. + If set to true, and the trigger is + not found, a new trigger will be + created. In this situation, + `update_mask` is ignored. This corresponds to the ``allow_missing`` field on the ``request`` instance; if ``request`` is provided, this @@ -742,11 +748,13 @@ async def sample_update_trigger(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.eventarc_v1.types.Trigger` A - representation of the trigger resource. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Trigger` + A representation of the trigger + resource. """ # Create or coerce a protobuf request object. @@ -877,11 +885,13 @@ async def sample_delete_trigger(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.eventarc_v1.types.Trigger` A - representation of the trigger resource. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Trigger` + A representation of the trigger + resource. """ # Create or coerce a protobuf request object. @@ -1109,10 +1119,11 @@ async def sample_list_channels(): Returns: google.cloud.eventarc_v1.services.eventarc.pagers.ListChannelsAsyncPager: - The response message for the ListChannels method. - - Iterating over this object will yield results and - resolve additional pages automatically. + The response message for the + `ListChannels` method. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1254,14 +1265,19 @@ async def sample_create_channel(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.eventarc_v1.types.Channel` A representation of the Channel resource. - A Channel is a resource on which event providers - publish their events. The published events are - delivered through the transport associated with the - channel. Note that a channel is associated with - exactly one event provider. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Channel` + A representation of the Channel + resource. A Channel is a resource on + which event providers publish their + events. The published events are + delivered through the transport + associated with the channel. Note that a + channel is associated with exactly one + event provider. """ # Create or coerce a protobuf request object. @@ -1372,10 +1388,12 @@ async def sample_update_channel(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - The fields to be updated; only fields explicitly - provided are updated. If no field mask is provided, all - provided fields in the request are updated. To update - all fields, provide a field mask of "\*". + The fields to be updated; only fields + explicitly provided are updated. If no + field mask is provided, all provided + fields in the request are updated. To + update all fields, provide a field mask + of "*". This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1390,14 +1408,19 @@ async def sample_update_channel(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.eventarc_v1.types.Channel` A representation of the Channel resource. - A Channel is a resource on which event providers - publish their events. The published events are - delivered through the transport associated with the - channel. Note that a channel is associated with - exactly one event provider. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Channel` + A representation of the Channel + resource. A Channel is a resource on + which event providers publish their + events. The published events are + delivered through the transport + associated with the channel. Note that a + channel is associated with exactly one + event provider. """ # Create or coerce a protobuf request object. @@ -1517,14 +1540,19 @@ async def sample_delete_channel(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.eventarc_v1.types.Channel` A representation of the Channel resource. - A Channel is a resource on which event providers - publish their events. The published events are - delivered through the transport associated with the - channel. Note that a channel is associated with - exactly one event provider. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Channel` + A representation of the Channel + resource. A Channel is a resource on + which event providers publish their + events. The published events are + delivered through the transport + associated with the channel. Note that a + channel is associated with exactly one + event provider. """ # Create or coerce a protobuf request object. @@ -1744,10 +1772,11 @@ async def sample_list_providers(): Returns: google.cloud.eventarc_v1.services.eventarc.pagers.ListProvidersAsyncPager: - The response message for the ListProviders method. - - Iterating over this object will yield results and - resolve additional pages automatically. + The response message for the + `ListProviders` method. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1975,11 +2004,11 @@ async def sample_list_channel_connections(): Returns: google.cloud.eventarc_v1.services.eventarc.pagers.ListChannelConnectionsAsyncPager: - The response message for the ListChannelConnections - method. - - Iterating over this object will yield results and - resolve additional pages automatically. + The response message for the + `ListChannelConnections` method. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -2122,13 +2151,18 @@ async def sample_create_channel_connection(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.eventarc_v1.types.ChannelConnection` A representation of the ChannelConnection resource. - A ChannelConnection is a resource which event - providers create during the activation process to - establish a connection between the provider and the - subscriber channel. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.ChannelConnection` + A representation of the + ChannelConnection resource. A + ChannelConnection is a resource which + event providers create during the + activation process to establish a + connection between the provider and the + subscriber channel. """ # Create or coerce a protobuf request object. @@ -2249,13 +2283,18 @@ async def sample_delete_channel_connection(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.eventarc_v1.types.ChannelConnection` A representation of the ChannelConnection resource. - A ChannelConnection is a resource which event - providers create during the activation process to - establish a connection between the provider and the - subscriber channel. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.ChannelConnection` + A representation of the + ChannelConnection resource. A + ChannelConnection is a resource which + event providers create during the + activation process to establish a + connection between the provider and the + subscriber channel. """ # Create or coerce a protobuf request object. @@ -2473,10 +2512,12 @@ async def sample_update_google_channel_config(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - The fields to be updated; only fields explicitly - provided are updated. If no field mask is provided, all - provided fields in the request are updated. To update - all fields, provide a field mask of "\*". + The fields to be updated; only fields + explicitly provided are updated. If no + field mask is provided, all provided + fields in the request are updated. To + update all fields, provide a field mask + of "*". This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py index 9e42d07b67..b348f74715 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py @@ -881,10 +881,11 @@ def sample_list_triggers(): Returns: google.cloud.eventarc_v1.services.eventarc.pagers.ListTriggersPager: - The response message for the ListTriggers method. - - Iterating over this object will yield results and - resolve additional pages automatically. + The response message for the + `ListTriggers` method. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1028,11 +1029,13 @@ def sample_create_trigger(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.eventarc_v1.types.Trigger` A - representation of the trigger resource. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Trigger` + A representation of the trigger + resource. """ # Create or coerce a protobuf request object. @@ -1143,18 +1146,21 @@ def sample_update_trigger(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - The fields to be updated; only fields explicitly - provided are updated. If no field mask is provided, all - provided fields in the request are updated. To update - all fields, provide a field mask of "\*". + The fields to be updated; only fields + explicitly provided are updated. If no + field mask is provided, all provided + fields in the request are updated. To + update all fields, provide a field mask + of "*". This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. allow_missing (bool): - If set to true, and the trigger is not found, a new - trigger will be created. In this situation, - ``update_mask`` is ignored. + If set to true, and the trigger is + not found, a new trigger will be + created. In this situation, + `update_mask` is ignored. This corresponds to the ``allow_missing`` field on the ``request`` instance; if ``request`` is provided, this @@ -1169,11 +1175,13 @@ def sample_update_trigger(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.eventarc_v1.types.Trigger` A - representation of the trigger resource. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Trigger` + A representation of the trigger + resource. """ # Create or coerce a protobuf request object. @@ -1303,11 +1311,13 @@ def sample_delete_trigger(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.eventarc_v1.types.Trigger` A - representation of the trigger resource. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Trigger` + A representation of the trigger + resource. """ # Create or coerce a protobuf request object. @@ -1533,10 +1543,11 @@ def sample_list_channels(): Returns: google.cloud.eventarc_v1.services.eventarc.pagers.ListChannelsPager: - The response message for the ListChannels method. - - Iterating over this object will yield results and - resolve additional pages automatically. + The response message for the + `ListChannels` method. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1677,14 +1688,19 @@ def sample_create_channel(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.eventarc_v1.types.Channel` A representation of the Channel resource. - A Channel is a resource on which event providers - publish their events. The published events are - delivered through the transport associated with the - channel. Note that a channel is associated with - exactly one event provider. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Channel` + A representation of the Channel + resource. A Channel is a resource on + which event providers publish their + events. The published events are + delivered through the transport + associated with the channel. Note that a + channel is associated with exactly one + event provider. """ # Create or coerce a protobuf request object. @@ -1794,10 +1810,12 @@ def sample_update_channel(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - The fields to be updated; only fields explicitly - provided are updated. If no field mask is provided, all - provided fields in the request are updated. To update - all fields, provide a field mask of "\*". + The fields to be updated; only fields + explicitly provided are updated. If no + field mask is provided, all provided + fields in the request are updated. To + update all fields, provide a field mask + of "*". This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -1812,14 +1830,19 @@ def sample_update_channel(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.eventarc_v1.types.Channel` A representation of the Channel resource. - A Channel is a resource on which event providers - publish their events. The published events are - delivered through the transport associated with the - channel. Note that a channel is associated with - exactly one event provider. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Channel` + A representation of the Channel + resource. A Channel is a resource on + which event providers publish their + events. The published events are + delivered through the transport + associated with the channel. Note that a + channel is associated with exactly one + event provider. """ # Create or coerce a protobuf request object. @@ -1938,14 +1961,19 @@ def sample_delete_channel(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.eventarc_v1.types.Channel` A representation of the Channel resource. - A Channel is a resource on which event providers - publish their events. The published events are - delivered through the transport associated with the - channel. Note that a channel is associated with - exactly one event provider. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.Channel` + A representation of the Channel + resource. A Channel is a resource on + which event providers publish their + events. The published events are + delivered through the transport + associated with the channel. Note that a + channel is associated with exactly one + event provider. """ # Create or coerce a protobuf request object. @@ -2163,10 +2191,11 @@ def sample_list_providers(): Returns: google.cloud.eventarc_v1.services.eventarc.pagers.ListProvidersPager: - The response message for the ListProviders method. - - Iterating over this object will yield results and - resolve additional pages automatically. + The response message for the + `ListProviders` method. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -2392,11 +2421,11 @@ def sample_list_channel_connections(): Returns: google.cloud.eventarc_v1.services.eventarc.pagers.ListChannelConnectionsPager: - The response message for the ListChannelConnections - method. - - Iterating over this object will yield results and - resolve additional pages automatically. + The response message for the + `ListChannelConnections` method. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -2538,13 +2567,18 @@ def sample_create_channel_connection(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.eventarc_v1.types.ChannelConnection` A representation of the ChannelConnection resource. - A ChannelConnection is a resource which event - providers create during the activation process to - establish a connection between the provider and the - subscriber channel. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.ChannelConnection` + A representation of the + ChannelConnection resource. A + ChannelConnection is a resource which + event providers create during the + activation process to establish a + connection between the provider and the + subscriber channel. """ # Create or coerce a protobuf request object. @@ -2664,13 +2698,18 @@ def sample_delete_channel_connection(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.cloud.eventarc_v1.types.ChannelConnection` A representation of the ChannelConnection resource. - A ChannelConnection is a resource which event - providers create during the activation process to - establish a connection between the provider and the - subscriber channel. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.eventarc_v1.types.ChannelConnection` + A representation of the + ChannelConnection resource. A + ChannelConnection is a resource which + event providers create during the + activation process to establish a + connection between the provider and the + subscriber channel. """ # Create or coerce a protobuf request object. @@ -2886,10 +2925,12 @@ def sample_update_google_channel_config(): on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - The fields to be updated; only fields explicitly - provided are updated. If no field mask is provided, all - provided fields in the request are updated. To update - all fields, provide a field mask of "\*". + The fields to be updated; only fields + explicitly provided are updated. If no + field mask is provided, all provided + fields in the request are updated. To + update all fields, provide a field mask + of "*". This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py index 1d4a69adf0..e7ae204609 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py @@ -2627,8 +2627,8 @@ def __call__(self, Returns: ~.eventarc.ListChannelConnectionsResponse: - The response message for the ``ListChannelConnections`` - method. + The response message for the + `ListChannelConnections` method. """ @@ -2749,7 +2749,9 @@ def __call__(self, Returns: ~.eventarc.ListChannelsResponse: - The response message for the ``ListChannels`` method. + The response message for the + `ListChannels` method. + """ http_options = _BaseEventarcRestTransport._BaseListChannels._get_http_options() @@ -2869,7 +2871,9 @@ def __call__(self, Returns: ~.eventarc.ListProvidersResponse: - The response message for the ``ListProviders`` method. + The response message for the + `ListProviders` method. + """ http_options = _BaseEventarcRestTransport._BaseListProviders._get_http_options() @@ -2989,7 +2993,9 @@ def __call__(self, Returns: ~.eventarc.ListTriggersResponse: - The response message for the ``ListTriggers`` method. + The response message for the + `ListTriggers` method. + """ http_options = _BaseEventarcRestTransport._BaseListTriggers._get_http_options() diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/channel.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/channel.py index 0c3d920b1a..83fdc73ae3 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/channel.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/channel.py @@ -42,9 +42,10 @@ class Channel(proto.Message): Attributes: name (str): - Required. The resource name of the channel. Must be unique - within the location on the project and must be in - ``projects/{project}/locations/{location}/channels/{channel_id}`` + Required. The resource name of the channel. + Must be unique within the location on the + project and must be in + `projects/{project}/locations/{location}/channels/{channel_id}` format. uid (str): Output only. Server assigned unique @@ -56,14 +57,18 @@ class Channel(proto.Message): update_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The last-modified time. provider (str): - The name of the event provider (e.g. Eventarc SaaS partner) - associated with the channel. This provider will be granted - permissions to publish events to the channel. Format: - ``projects/{project}/locations/{location}/providers/{provider_id}``. + The name of the event provider (e.g. Eventarc + SaaS partner) associated with the channel. This + provider will be granted permissions to publish + events to the channel. Format: + + `projects/{project}/locations/{location}/providers/{provider_id}`. pubsub_topic (str): - Output only. The name of the Pub/Sub topic created and - managed by Eventarc system as a transport for the event - delivery. Format: ``projects/{project}/topics/{topic_id}``. + Output only. The name of the Pub/Sub topic + created and managed by Eventarc system as a + transport for the event delivery. Format: + + `projects/{project}/topics/{topic_id}`. This field is a member of `oneof`_ ``transport``. state (google.cloud.eventarc_v1.types.Channel.State): @@ -73,11 +78,12 @@ class Channel(proto.Message): channel. The token must be used by the provider to register the channel for publishing. crypto_key_name (str): - Optional. Resource name of a KMS crypto key (managed by the - user) used to encrypt/decrypt their event data. + Optional. Resource name of a KMS crypto key + (managed by the user) used to encrypt/decrypt + their event data. It must match the pattern - ``projects/*/locations/*/keyRings/*/cryptoKeys/*``. + `projects/*/locations/*/keyRings/*/cryptoKeys/*`. """ class State(proto.Enum): r"""State lists all the possible states of a Channel diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/channel_connection.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/channel_connection.py index 5279252f19..26adbed388 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/channel_connection.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/channel_connection.py @@ -44,10 +44,11 @@ class ChannelConnection(proto.Message): resource. The server guarantees uniqueness and immutability until deleted. channel (str): - Required. The name of the connected subscriber Channel. This - is a weak reference to avoid cross project and cross - accounts references. This must be in - ``projects/{project}/location/{location}/channels/{channel_id}`` + Required. The name of the connected + subscriber Channel. This is a weak reference to + avoid cross project and cross accounts + references. This must be in + `projects/{project}/location/{location}/channels/{channel_id}` format. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The creation time. diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/discovery.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/discovery.py index 430bae6e41..4e3a81ae22 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/discovery.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/discovery.py @@ -36,7 +36,7 @@ class Provider(proto.Message): Attributes: name (str): Output only. In - ``projects/{project}/locations/{location}/providers/{provider_id}`` + `projects/{project}/locations/{location}/providers/{provider_id}` format. display_name (str): Output only. Human friendly name for the diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/eventarc.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/eventarc.py index 4f1d3c88bf..53b08538bc 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/eventarc.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/eventarc.py @@ -85,18 +85,21 @@ class ListTriggersRequest(proto.Message): Note: The service may send fewer. page_token (str): The page token; provide the value from the - ``next_page_token`` field in a previous ``ListTriggers`` - call to retrieve the subsequent page. + `next_page_token` field in a previous + `ListTriggers` call to retrieve the subsequent + page. - When paginating, all other parameters provided to - ``ListTriggers`` must match the call that provided the page - token. + When paginating, all other parameters provided + to `ListTriggers` must match the call that + provided the page token. order_by (str): - The sorting order of the resources returned. Value should be - a comma-separated list of fields. The default sorting order - is ascending. To specify descending order for a field, - append a ``desc`` suffix; for example: - ``name desc, trigger_id``. + The sorting order of the resources returned. + Value should be a comma-separated list of + fields. The default sorting order is ascending. + To specify descending order for a field, append + a `desc` suffix; for example: + + `name desc, trigger_id`. filter (str): Filter field. Used to filter the Triggers to be listed. Possible filters are described in @@ -128,16 +131,16 @@ class ListTriggersRequest(proto.Message): class ListTriggersResponse(proto.Message): - r"""The response message for the ``ListTriggers`` method. + r"""The response message for the `ListTriggers` method. Attributes: triggers (MutableSequence[google.cloud.eventarc_v1.types.Trigger]): - The requested triggers, up to the number specified in - ``page_size``. + The requested triggers, up to the number + specified in `page_size`. next_page_token (str): - A page token that can be sent to ``ListTriggers`` to request - the next page. If this is empty, then there are no more - pages. + A page token that can be sent to + `ListTriggers` to request the next page. If this + is empty, then there are no more pages. unreachable (MutableSequence[str]): Unreachable resources, if any. """ @@ -204,14 +207,15 @@ class UpdateTriggerRequest(proto.Message): trigger (google.cloud.eventarc_v1.types.Trigger): The trigger to be updated. update_mask (google.protobuf.field_mask_pb2.FieldMask): - The fields to be updated; only fields explicitly provided - are updated. If no field mask is provided, all provided - fields in the request are updated. To update all fields, - provide a field mask of "\*". + The fields to be updated; only fields + explicitly provided are updated. If no field + mask is provided, all provided fields in the + request are updated. To update all fields, + provide a field mask of "*". allow_missing (bool): - If set to true, and the trigger is not found, a new trigger - will be created. In this situation, ``update_mask`` is - ignored. + If set to true, and the trigger is not found, + a new trigger will be created. In this + situation, `update_mask` is ignored. validate_only (bool): Required. If set, validate the request and preview the review, but do not post it. @@ -302,18 +306,21 @@ class ListChannelsRequest(proto.Message): Note: The service may send fewer. page_token (str): The page token; provide the value from the - ``next_page_token`` field in a previous ``ListChannels`` - call to retrieve the subsequent page. + `next_page_token` field in a previous + `ListChannels` call to retrieve the subsequent + page. - When paginating, all other parameters provided to - ``ListChannels`` must match the call that provided the page - token. + When paginating, all other parameters provided + to `ListChannels` must match the call that + provided the page token. order_by (str): - The sorting order of the resources returned. Value should be - a comma-separated list of fields. The default sorting order - is ascending. To specify descending order for a field, - append a ``desc`` suffix; for example: - ``name desc, channel_id``. + The sorting order of the resources returned. + Value should be a comma-separated list of + fields. The default sorting order is ascending. + To specify descending order for a field, append + a `desc` suffix; for example: + + `name desc, channel_id`. """ parent: str = proto.Field( @@ -335,16 +342,16 @@ class ListChannelsRequest(proto.Message): class ListChannelsResponse(proto.Message): - r"""The response message for the ``ListChannels`` method. + r"""The response message for the `ListChannels` method. Attributes: channels (MutableSequence[google.cloud.eventarc_v1.types.Channel]): - The requested channels, up to the number specified in - ``page_size``. + The requested channels, up to the number + specified in `page_size`. next_page_token (str): - A page token that can be sent to ``ListChannels`` to request - the next page. If this is empty, then there are no more - pages. + A page token that can be sent to + `ListChannels` to request the next page. If this + is empty, then there are no more pages. unreachable (MutableSequence[str]): Unreachable resources, if any. """ @@ -411,10 +418,11 @@ class UpdateChannelRequest(proto.Message): channel (google.cloud.eventarc_v1.types.Channel): The channel to be updated. update_mask (google.protobuf.field_mask_pb2.FieldMask): - The fields to be updated; only fields explicitly provided - are updated. If no field mask is provided, all provided - fields in the request are updated. To update all fields, - provide a field mask of "\*". + The fields to be updated; only fields + explicitly provided are updated. If no field + mask is provided, all provided fields in the + request are updated. To update all fields, + provide a field mask of "*". validate_only (bool): Required. If set, validate the request and preview the review, but do not post it. @@ -483,17 +491,21 @@ class ListProvidersRequest(proto.Message): each page. page_token (str): The page token; provide the value from the - ``next_page_token`` field in a previous ``ListProviders`` - call to retrieve the subsequent page. + `next_page_token` field in a previous + `ListProviders` call to retrieve the subsequent + page. - When paginating, all other parameters provided to - ``ListProviders`` must match the call that provided the page - token. + When paginating, all other parameters provided + to `ListProviders` must match the call that + provided the page token. order_by (str): - The sorting order of the resources returned. Value should be - a comma-separated list of fields. The default sorting oder - is ascending. To specify descending order for a field, - append a ``desc`` suffix; for example: ``name desc, _id``. + The sorting order of the resources returned. + Value should be a comma-separated list of + fields. The default sorting oder is ascending. + To specify descending order for a field, append + a `desc` suffix; for example: + + `name desc, _id`. filter (str): The filter field that the list request will filter on. @@ -522,16 +534,16 @@ class ListProvidersRequest(proto.Message): class ListProvidersResponse(proto.Message): - r"""The response message for the ``ListProviders`` method. + r"""The response message for the `ListProviders` method. Attributes: providers (MutableSequence[google.cloud.eventarc_v1.types.Provider]): - The requested providers, up to the number specified in - ``page_size``. + The requested providers, up to the number + specified in `page_size`. next_page_token (str): - A page token that can be sent to ``ListProviders`` to - request the next page. If this is empty, then there are no - more pages. + A page token that can be sent to + `ListProviders` to request the next page. If + this is empty, then there are no more pages. unreachable (MutableSequence[str]): Unreachable resources, if any. """ @@ -583,13 +595,13 @@ class ListChannelConnectionsRequest(proto.Message): Note: The service may send fewer responses. page_token (str): The page token; provide the value from the - ``next_page_token`` field in a previous - ``ListChannelConnections`` call to retrieve the subsequent - page. + `next_page_token` field in a previous + `ListChannelConnections` call to retrieve the + subsequent page. - When paginating, all other parameters provided to - ``ListChannelConnetions`` match the call that provided the - page token. + When paginating, all other parameters provided + to `ListChannelConnetions` match the call that + provided the page token. """ parent: str = proto.Field( @@ -607,16 +619,17 @@ class ListChannelConnectionsRequest(proto.Message): class ListChannelConnectionsResponse(proto.Message): - r"""The response message for the ``ListChannelConnections`` method. + r"""The response message for the `ListChannelConnections` method. Attributes: channel_connections (MutableSequence[google.cloud.eventarc_v1.types.ChannelConnection]): - The requested channel connections, up to the number - specified in ``page_size``. + The requested channel connections, up to the + number specified in `page_size`. next_page_token (str): - A page token that can be sent to ``ListChannelConnections`` - to request the next page. If this is empty, then there are - no more pages. + A page token that can be sent to + `ListChannelConnections` to request the next + page. If this is empty, then there are no more + pages. unreachable (MutableSequence[str]): Unreachable resources, if any. """ @@ -691,10 +704,11 @@ class UpdateGoogleChannelConfigRequest(proto.Message): google_channel_config (google.cloud.eventarc_v1.types.GoogleChannelConfig): Required. The config to be updated. update_mask (google.protobuf.field_mask_pb2.FieldMask): - The fields to be updated; only fields explicitly provided - are updated. If no field mask is provided, all provided - fields in the request are updated. To update all fields, - provide a field mask of "\*". + The fields to be updated; only fields + explicitly provided are updated. If no field + mask is provided, all provided fields in the + request are updated. To update all fields, + provide a field mask of "*". """ google_channel_config: gce_google_channel_config.GoogleChannelConfig = proto.Field( @@ -743,11 +757,12 @@ class OperationMetadata(proto.Message): Output only. Human-readable status of the operation, if any. requested_cancellation (bool): - Output only. Identifies whether the user has requested - cancellation of the operation. Operations that have - successfully been cancelled have [Operation.error][] value - with a [google.rpc.Status.code][google.rpc.Status.code] of - 1, corresponding to ``Code.CANCELLED``. + Output only. Identifies whether the user has + requested cancellation of the operation. + Operations that have successfully been cancelled + have [Operation.error][] value with a + [google.rpc.Status.code][google.rpc.Status.code] + of 1, corresponding to `Code.CANCELLED`. api_version (str): Output only. API version used to start the operation. diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/google_channel_config.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/google_channel_config.py index 2e17f40ae1..0f84298602 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/google_channel_config.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/google_channel_config.py @@ -39,17 +39,18 @@ class GoogleChannelConfig(proto.Message): Attributes: name (str): - Required. The resource name of the config. Must be in the - format of, - ``projects/{project}/locations/{location}/googleChannelConfig``. + Required. The resource name of the config. + Must be in the format of, + `projects/{project}/locations/{location}/googleChannelConfig`. update_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The last-modified time. crypto_key_name (str): - Optional. Resource name of a KMS crypto key (managed by the - user) used to encrypt/decrypt their event data. + Optional. Resource name of a KMS crypto key + (managed by the user) used to encrypt/decrypt + their event data. It must match the pattern - ``projects/*/locations/*/keyRings/*/cryptoKeys/*``. + `projects/*/locations/*/keyRings/*/cryptoKeys/*`. """ name: str = proto.Field( diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/trigger.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/trigger.py index 83174e8cce..57448bc893 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/trigger.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/types/trigger.py @@ -43,9 +43,10 @@ class Trigger(proto.Message): Attributes: name (str): - Required. The resource name of the trigger. Must be unique - within the location of the project and must be in - ``projects/{project}/locations/{location}/triggers/{trigger}`` + Required. The resource name of the trigger. + Must be unique within the location of the + project and must be in + `projects/{project}/locations/{location}/triggers/{trigger}` format. uid (str): Output only. Server-assigned unique @@ -62,23 +63,24 @@ class Trigger(proto.Message): that match all the provided filters are sent to the destination. service_account (str): - Optional. The IAM service account email associated with the - trigger. The service account represents the identity of the - trigger. + Optional. The IAM service account email + associated with the trigger. The service account + represents the identity of the trigger. The principal who calls this API must have the - ``iam.serviceAccounts.actAs`` permission in the service - account. See + `iam.serviceAccounts.actAs` permission in the + service account. See https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common for more information. - For Cloud Run destinations, this service account is used to - generate identity tokens when invoking the service. See + For Cloud Run destinations, this service account + is used to generate identity tokens when + invoking the service. See https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account - for information on how to invoke authenticated Cloud Run - services. To create Audit Log triggers, the service account - should also have the ``roles/eventarc.eventReceiver`` IAM - role. + for information on how to invoke authenticated + Cloud Run services. To create Audit Log + triggers, the service account should also have + the `roles/eventarc.eventReceiver` IAM role. destination (google.cloud.eventarc_v1.types.Destination): Required. Destination specifies where the events should be sent to. @@ -92,11 +94,11 @@ class Trigger(proto.Message): Optional. User labels attached to the triggers that can be used to group resources. channel (str): - Optional. The name of the channel associated with the - trigger in - ``projects/{project}/locations/{location}/channels/{channel}`` - format. You must provide a channel to receive events from - Eventarc SaaS partners. + Optional. The name of the channel associated + with the trigger in + `projects/{project}/locations/{location}/channels/{channel}` + format. You must provide a channel to receive + events from Eventarc SaaS partners. conditions (MutableMapping[str, google.cloud.eventarc_v1.types.StateCondition]): Output only. The reason(s) why a trigger is in FAILED state. @@ -181,10 +183,12 @@ class EventFilter(proto.Message): value (str): Required. The value for the attribute. operator (str): - Optional. The operator used for matching the events with the - value of the filter. If not specified, only events that have - an exact key-value pair specified in the filter are matched. - The only allowed value is ``match-path-pattern``. + Optional. The operator used for matching the + events with the value of the filter. If not + specified, only events that have an exact + key-value pair specified in the filter are + matched. The only allowed value is + `match-path-pattern`. """ attribute: str = proto.Field( @@ -240,9 +244,9 @@ class Destination(proto.Message): This field is a member of `oneof`_ ``descriptor``. cloud_function (str): - The Cloud Function resource name. Only Cloud Functions V2 is - supported. Format: - ``projects/{project}/locations/{location}/functions/{function}`` + The Cloud Function resource name. Only Cloud + Functions V2 is supported. Format: + `projects/{project}/locations/{location}/functions/{function}` This field is a member of `oneof`_ ``descriptor``. gke (google.cloud.eventarc_v1.types.GKE): @@ -252,10 +256,12 @@ class Destination(proto.Message): This field is a member of `oneof`_ ``descriptor``. workflow (str): - The resource name of the Workflow whose Executions are - triggered by the events. The Workflow resource should be - deployed in the same project as the trigger. Format: - ``projects/{project}/locations/{location}/workflows/{workflow}`` + The resource name of the Workflow whose + Executions are triggered by the events. The + Workflow resource should be deployed in the same + project as the trigger. + Format: + `projects/{project}/locations/{location}/workflows/{workflow}` This field is a member of `oneof`_ ``descriptor``. """ @@ -399,19 +405,23 @@ class Pubsub(proto.Message): Attributes: topic (str): - Optional. The name of the Pub/Sub topic created and managed - by Eventarc as a transport for the event delivery. Format: - ``projects/{PROJECT_ID}/topics/{TOPIC_NAME}``. - - You can set an existing topic for triggers of the type - ``google.cloud.pubsub.topic.v1.messagePublished``. The topic - you provide here is not deleted by Eventarc at trigger - deletion. + Optional. The name of the Pub/Sub topic + created and managed by Eventarc as a transport + for the event delivery. Format: + + `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. + + You can set an existing topic for triggers of + the type + `google.cloud.pubsub.topic.v1.messagePublished`. + The topic you provide here is not deleted by + Eventarc at trigger deletion. subscription (str): - Output only. The name of the Pub/Sub subscription created - and managed by Eventarc as a transport for the event - delivery. Format: - ``projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}``. + Output only. The name of the Pub/Sub + subscription created and managed by Eventarc as + a transport for the event delivery. Format: + + `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. """ topic: str = proto.Field( diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py index b5d7d26514..0abc89a108 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py @@ -304,20 +304,18 @@ async def sample_list_buckets(): Args: request (Optional[Union[google.cloud.logging_v2.types.ListBucketsRequest, dict]]): - The request object. The parameters to ``ListBuckets``. + The request object. The parameters to `ListBuckets`. parent (:class:`str`): - Required. The parent resource whose buckets are to be - listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - - Note: The locations portion of the resource must be - specified, but supplying the character ``-`` in place of + Required. The parent resource whose + buckets are to be listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + + Note: The locations portion of the + resource must be specified, but + supplying the character `-` in place of [LOCATION_ID] will return all buckets. This corresponds to the ``parent`` field @@ -433,7 +431,7 @@ async def sample_get_bucket(): Args: request (Optional[Union[google.cloud.logging_v2.types.GetBucketRequest, dict]]): - The request object. The parameters to ``GetBucket``. + The request object. The parameters to `GetBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -525,7 +523,7 @@ async def sample_create_bucket_async(): Args: request (Optional[Union[google.cloud.logging_v2.types.CreateBucketRequest, dict]]): - The request object. The parameters to ``CreateBucket``. + The request object. The parameters to `CreateBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -536,11 +534,13 @@ async def sample_create_bucket_async(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.LogBucket` - Describes a repository in which log entries are stored. + Describes a repository in which log + entries are stored. """ # Create or coerce a protobuf request object. @@ -592,11 +592,12 @@ async def update_bucket_async(self, ) -> operation_async.AsyncOperation: r"""Updates a log bucket asynchronously. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. .. code-block:: python @@ -630,7 +631,7 @@ async def sample_update_bucket_async(): Args: request (Optional[Union[google.cloud.logging_v2.types.UpdateBucketRequest, dict]]): - The request object. The parameters to ``UpdateBucket``. + The request object. The parameters to `UpdateBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -641,11 +642,13 @@ async def sample_update_bucket_async(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.LogBucket` - Describes a repository in which log entries are stored. + Describes a repository in which log + entries are stored. """ # Create or coerce a protobuf request object. @@ -728,7 +731,7 @@ async def sample_create_bucket(): Args: request (Optional[Union[google.cloud.logging_v2.types.CreateBucketRequest, dict]]): - The request object. The parameters to ``CreateBucket``. + The request object. The parameters to `CreateBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -784,11 +787,12 @@ async def update_bucket(self, ) -> logging_config.LogBucket: r"""Updates a log bucket. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. .. code-block:: python @@ -818,7 +822,7 @@ async def sample_update_bucket(): Args: request (Optional[Union[google.cloud.logging_v2.types.UpdateBucketRequest, dict]]): - The request object. The parameters to ``UpdateBucket``. + The request object. The parameters to `UpdateBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -874,10 +878,10 @@ async def delete_bucket(self, ) -> None: r"""Deletes a log bucket. - Changes the bucket's ``lifecycle_state`` to the - ``DELETE_REQUESTED`` state. After 7 days, the bucket will be - purged and all log entries in the bucket will be permanently - deleted. + Changes the bucket's `lifecycle_state` to the + `DELETE_REQUESTED` state. After 7 days, the bucket will + be purged and all log entries in the bucket will be + permanently deleted. .. code-block:: python @@ -904,7 +908,7 @@ async def sample_delete_bucket(): Args: request (Optional[Union[google.cloud.logging_v2.types.DeleteBucketRequest, dict]]): - The request object. The parameters to ``DeleteBucket``. + The request object. The parameters to `DeleteBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -978,7 +982,7 @@ async def sample_undelete_bucket(): Args: request (Optional[Union[google.cloud.logging_v2.types.UndeleteBucketRequest, dict]]): - The request object. The parameters to ``UndeleteBucket``. + The request object. The parameters to `UndeleteBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1055,13 +1059,11 @@ async def sample_list_views(): Args: request (Optional[Union[google.cloud.logging_v2.types.ListViewsRequest, dict]]): - The request object. The parameters to ``ListViews``. + The request object. The parameters to `ListViews`. parent (:class:`str`): - Required. The bucket whose views are to be listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The bucket whose views are + to be listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1176,7 +1178,7 @@ async def sample_get_view(): Args: request (Optional[Union[google.cloud.logging_v2.types.GetViewRequest, dict]]): - The request object. The parameters to ``GetView``. + The request object. The parameters to `GetView`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1262,7 +1264,7 @@ async def sample_create_view(): Args: request (Optional[Union[google.cloud.logging_v2.types.CreateViewRequest, dict]]): - The request object. The parameters to ``CreateView``. + The request object. The parameters to `CreateView`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1316,11 +1318,12 @@ async def update_view(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogView: - r"""Updates a view on a log bucket. This method replaces the - following fields in the existing view with values from the new - view: ``filter``. If an ``UNAVAILABLE`` error is returned, this - indicates that system is not in a state where it can update the - view. If this occurs, please try again in a few minutes. + r"""Updates a view on a log bucket. This method replaces + the following fields in the existing view with values + from the new view: `filter`. If an `UNAVAILABLE` error + is returned, this indicates that system is not in a + state where it can update the view. If this occurs, + please try again in a few minutes. .. code-block:: python @@ -1350,7 +1353,7 @@ async def sample_update_view(): Args: request (Optional[Union[google.cloud.logging_v2.types.UpdateViewRequest, dict]]): - The request object. The parameters to ``UpdateView``. + The request object. The parameters to `UpdateView`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1404,10 +1407,10 @@ async def delete_view(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a view on a log bucket. If an ``UNAVAILABLE`` error is - returned, this indicates that system is not in a state where it - can delete the view. If this occurs, please try again in a few - minutes. + r"""Deletes a view on a log bucket. + If an `UNAVAILABLE` error is returned, this indicates + that system is not in a state where it can delete the + view. If this occurs, please try again in a few minutes. .. code-block:: python @@ -1434,7 +1437,7 @@ async def sample_delete_view(): Args: request (Optional[Union[google.cloud.logging_v2.types.DeleteViewRequest, dict]]): - The request object. The parameters to ``DeleteView``. + The request object. The parameters to `DeleteView`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1511,17 +1514,14 @@ async def sample_list_sinks(): Args: request (Optional[Union[google.cloud.logging_v2.types.ListSinksRequest, dict]]): - The request object. The parameters to ``ListSinks``. + The request object. The parameters to `ListSinks`. parent (:class:`str`): - Required. The parent resource whose sinks are to be - listed: - - :: - + Required. The parent resource whose + sinks are to be listed: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1536,10 +1536,11 @@ async def sample_list_sinks(): Returns: google.cloud.logging_v2.services.config_service_v2.pagers.ListSinksAsyncPager: - Result returned from ListSinks. + Result returned from `ListSinks`. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1636,20 +1637,18 @@ async def sample_get_sink(): Args: request (Optional[Union[google.cloud.logging_v2.types.GetSinkRequest, dict]]): - The request object. The parameters to ``GetSink``. + The request object. The parameters to `GetSink`. sink_name (:class:`str`): - Required. The resource name of the sink: - - :: - - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + Required. The resource name of the + sink: + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1729,11 +1728,12 @@ async def create_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogSink: - r"""Creates a sink that exports specified log entries to a - destination. The export of newly-ingested log entries begins - immediately, unless the sink's ``writer_identity`` is not - permitted to write to the destination. A sink can export log - entries only from the resource owning the sink. + r"""Creates a sink that exports specified log entries to + a destination. The export of newly-ingested log entries + begins immediately, unless the sink's `writer_identity` + is not permitted to write to the destination. A sink can + export log entries only from the resource owning the + sink. .. code-block:: python @@ -1768,27 +1768,27 @@ async def sample_create_sink(): Args: request (Optional[Union[google.cloud.logging_v2.types.CreateSinkRequest, dict]]): - The request object. The parameters to ``CreateSink``. + The request object. The parameters to `CreateSink`. parent (:class:`str`): - Required. The resource in which to create the sink: - - :: - + Required. The resource in which to + create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" For examples: - ``"projects/my-project"`` ``"organizations/123456789"`` + `"projects/my-project"` + `"organizations/123456789"` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. sink (:class:`google.cloud.logging_v2.types.LogSink`): - Required. The new sink, whose ``name`` parameter is a - sink identifier that is not already in use. + Required. The new sink, whose `name` + parameter is a sink identifier that is + not already in use. This corresponds to the ``sink`` field on the ``request`` instance; if ``request`` is provided, this @@ -1871,12 +1871,13 @@ async def update_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogSink: - r"""Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, - and ``filter``. + r"""Updates a sink. This method replaces the following + fields in the existing sink with values from the new + sink: `destination`, and `filter`. - The updated sink might also have a new ``writer_identity``; see - the ``unique_writer_identity`` field. + The updated sink might also have a new + `writer_identity`; see the `unique_writer_identity` + field. .. code-block:: python @@ -1911,50 +1912,55 @@ async def sample_update_sink(): Args: request (Optional[Union[google.cloud.logging_v2.types.UpdateSinkRequest, dict]]): - The request object. The parameters to ``UpdateSink``. + The request object. The parameters to `UpdateSink`. sink_name (:class:`str`): - Required. The full resource name of the sink to update, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of + the sink to update, including the parent + resource and the sink identifier: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. sink (:class:`google.cloud.logging_v2.types.LogSink`): - Required. The updated sink, whose name is the same - identifier that appears as part of ``sink_name``. + Required. The updated sink, whose + name is the same identifier that appears + as part of `sink_name`. This corresponds to the ``sink`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Optional. Field mask that specifies the fields in - ``sink`` that need an update. A sink field will be - overwritten if, and only if, it is in the update mask. - ``name`` and output only fields cannot be updated. + Optional. Field mask that specifies + the fields in `sink` that need an + update. A sink field will be overwritten + if, and only if, it is in the update + mask. `name` and output only fields + cannot be updated. - An empty ``updateMask`` is temporarily treated as using - the following mask for backwards compatibility purposes: + An empty `updateMask` is temporarily + treated as using the following mask for + backwards compatibility purposes: - ``destination,filter,includeChildren`` + `destination,filter,includeChildren` - At some point in the future, behavior will be removed - and specifying an empty ``updateMask`` will be an error. + At some point in the future, behavior + will be removed and specifying an empty + `updateMask` will be an error. - For a detailed ``FieldMask`` definition, see + For a detailed `FieldMask` definition, + see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - For example: ``updateMask=filter`` + For example: `updateMask=filter` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -2037,8 +2043,9 @@ async def delete_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a sink. If the sink has a unique ``writer_identity``, - then that service account is also deleted. + r"""Deletes a sink. If the sink has a unique + `writer_identity`, then that service account is also + deleted. .. code-block:: python @@ -2065,21 +2072,20 @@ async def sample_delete_sink(): Args: request (Optional[Union[google.cloud.logging_v2.types.DeleteSinkRequest, dict]]): - The request object. The parameters to ``DeleteSink``. + The request object. The parameters to `DeleteSink`. sink_name (:class:`str`): - Required. The full resource name of the sink to delete, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of + the sink to delete, including the parent + resource and the sink identifier: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -2184,15 +2190,12 @@ async def sample_create_link(): request (Optional[Union[google.cloud.logging_v2.types.CreateLinkRequest, dict]]): The request object. The parameters to CreateLink. parent (:class:`str`): - Required. The full resource name of the bucket to create - a link for. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The full resource name of + the bucket to create a link for. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -2203,9 +2206,11 @@ async def sample_create_link(): on the ``request`` instance; if ``request`` is provided, this should not be set. link_id (:class:`str`): - Required. The ID to use for the link. The link_id can - have up to 100 characters. A valid link_id must only - have alphanumeric characters and underscores within it. + Required. The ID to use for the link. + The link_id can have up to 100 + characters. A valid link_id must only + have alphanumeric characters and + underscores within it. This corresponds to the ``link_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -2220,11 +2225,13 @@ async def sample_create_link(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.logging_v2.types.Link` Describes a - link connected to an analytics enabled bucket. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.logging_v2.types.Link` + Describes a link connected to an + analytics enabled bucket. """ # Create or coerce a protobuf request object. @@ -2329,8 +2336,8 @@ async def sample_delete_link(): request (Optional[Union[google.cloud.logging_v2.types.DeleteLinkRequest, dict]]): The request object. The parameters to DeleteLink. name (:class:`str`): - Required. The full resource name of the link to delete. - + Required. The full resource name of + the link to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" @@ -2349,18 +2356,21 @@ async def sample_delete_link(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -2457,9 +2467,8 @@ async def sample_list_links(): request (Optional[Union[google.cloud.logging_v2.types.ListLinksRequest, dict]]): The request object. The parameters to ListLinks. parent (:class:`str`): - Required. The parent resource whose links are to be - listed: - + Required. The parent resource whose + links are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" @@ -2581,8 +2590,8 @@ async def sample_get_link(): request (Optional[Union[google.cloud.logging_v2.types.GetLinkRequest, dict]]): The request object. The parameters to GetLink. name (:class:`str`): - Required. The resource name of the link: - + Required. The resource name of the + link: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" @@ -2658,8 +2667,8 @@ async def list_exclusions(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListExclusionsAsyncPager: - r"""Lists all the exclusions on the \_Default sink in a parent - resource. + r"""Lists all the exclusions on the _Default sink in a + parent resource. .. code-block:: python @@ -2690,17 +2699,14 @@ async def sample_list_exclusions(): Args: request (Optional[Union[google.cloud.logging_v2.types.ListExclusionsRequest, dict]]): - The request object. The parameters to ``ListExclusions``. + The request object. The parameters to `ListExclusions`. parent (:class:`str`): - Required. The parent resource whose exclusions are to be - listed. - - :: - + Required. The parent resource whose + exclusions are to be listed. "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -2715,10 +2721,11 @@ async def sample_list_exclusions(): Returns: google.cloud.logging_v2.services.config_service_v2.pagers.ListExclusionsAsyncPager: - Result returned from ListExclusions. - - Iterating over this object will yield results and - resolve additional pages automatically. + Result returned from + `ListExclusions`. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -2785,7 +2792,8 @@ async def get_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Gets the description of an exclusion in the \_Default sink. + r"""Gets the description of an exclusion in the _Default + sink. .. code-block:: python @@ -2815,20 +2823,18 @@ async def sample_get_exclusion(): Args: request (Optional[Union[google.cloud.logging_v2.types.GetExclusionRequest, dict]]): - The request object. The parameters to ``GetExclusion``. + The request object. The parameters to `GetExclusion`. name (:class:`str`): - Required. The resource name of an existing exclusion: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of an + existing exclusion: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -2843,13 +2849,16 @@ async def sample_get_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -2906,9 +2915,10 @@ async def create_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Creates a new exclusion in the \_Default sink in a specified - parent resource. Only log entries belonging to that resource can - be excluded. You can have up to 10 exclusions in a resource. + r"""Creates a new exclusion in the _Default sink in a + specified parent resource. Only log entries belonging to + that resource can be excluded. You can have up to 10 + exclusions in a resource. .. code-block:: python @@ -2943,29 +2953,27 @@ async def sample_create_exclusion(): Args: request (Optional[Union[google.cloud.logging_v2.types.CreateExclusionRequest, dict]]): - The request object. The parameters to ``CreateExclusion``. + The request object. The parameters to `CreateExclusion`. parent (:class:`str`): - Required. The parent resource in which to create the - exclusion: - - :: - + Required. The parent resource in + which to create the exclusion: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" For examples: - ``"projects/my-logging-project"`` - ``"organizations/123456789"`` + `"projects/my-logging-project"` + `"organizations/123456789"` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. exclusion (:class:`google.cloud.logging_v2.types.LogExclusion`): - Required. The new exclusion, whose ``name`` parameter is - an exclusion name that is not already used in the parent + Required. The new exclusion, whose + `name` parameter is an exclusion name + that is not already used in the parent resource. This corresponds to the ``exclusion`` field @@ -2981,13 +2989,16 @@ async def sample_create_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -3047,8 +3058,8 @@ async def update_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Changes one or more properties of an existing exclusion in the - \_Default sink. + r"""Changes one or more properties of an existing + exclusion in the _Default sink. .. code-block:: python @@ -3083,42 +3094,43 @@ async def sample_update_exclusion(): Args: request (Optional[Union[google.cloud.logging_v2.types.UpdateExclusionRequest, dict]]): - The request object. The parameters to ``UpdateExclusion``. + The request object. The parameters to `UpdateExclusion`. name (:class:`str`): - Required. The resource name of the exclusion to update: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of the + exclusion to update: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. exclusion (:class:`google.cloud.logging_v2.types.LogExclusion`): - Required. New values for the existing exclusion. Only - the fields specified in ``update_mask`` are relevant. + Required. New values for the existing + exclusion. Only the fields specified in + `update_mask` are relevant. This corresponds to the ``exclusion`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Required. A non-empty list of fields to change in the - existing exclusion. New values for the fields are taken - from the corresponding fields in the - [LogExclusion][google.logging.v2.LogExclusion] included - in this request. Fields not mentioned in ``update_mask`` - are not changed and are ignored in the request. - - For example, to change the filter and description of an - exclusion, specify an ``update_mask`` of - ``"filter,description"``. + Required. A non-empty list of fields + to change in the existing exclusion. New + values for the fields are taken from the + corresponding fields in the + [LogExclusion][google.logging.v2.LogExclusion] + included in this request. Fields not + mentioned in `update_mask` are not + changed and are ignored in the request. + + For example, to change the filter and + description of an exclusion, specify an + `update_mask` of `"filter,description"`. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -3133,13 +3145,16 @@ async def sample_update_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -3199,7 +3214,7 @@ async def delete_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes an exclusion in the \_Default sink. + r"""Deletes an exclusion in the _Default sink. .. code-block:: python @@ -3226,21 +3241,18 @@ async def sample_delete_exclusion(): Args: request (Optional[Union[google.cloud.logging_v2.types.DeleteExclusionRequest, dict]]): - The request object. The parameters to ``DeleteExclusion``. + The request object. The parameters to `DeleteExclusion`. name (:class:`str`): - Required. The resource name of an existing exclusion to - delete: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of an + existing exclusion to delete: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -3302,15 +3314,16 @@ async def get_cmek_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.CmekSettings: - r"""Gets the Logging CMEK settings for the given resource. - - Note: CMEK for the Log Router can be configured for Google Cloud - projects, folders, organizations and billing accounts. Once - configured for an organization, it applies to all projects and - folders in the Google Cloud organization. - - See `Enabling CMEK for Log - Router `__ + r"""Gets the Logging CMEK settings for the given + resource. + Note: CMEK for the Log Router can be configured for + Google Cloud projects, folders, organizations and + billing accounts. Once configured for an organization, + it applies to all projects and folders in the Google + Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3344,8 +3357,8 @@ async def sample_get_cmek_settings(): The request object. The parameters to [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -3357,18 +3370,21 @@ async def sample_get_cmek_settings(): Returns: google.cloud.logging_v2.types.CmekSettings: - Describes the customer-managed encryption key (CMEK) settings associated with - a project, folder, organization, billing account, or - flexible resource. - - Note: CMEK for the Log Router can currently only be - configured for Google Cloud organizations. Once - configured, it applies to all projects and folders in - the Google Cloud organization. - - See [Enabling CMEK for Log - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Describes the customer-managed + encryption key (CMEK) settings + associated with a project, folder, + organization, billing account, or + flexible resource. + + Note: CMEK for the Log Router can + currently only be configured for Google + Cloud organizations. Once configured, it + applies to all projects and folders in + the Google Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ # Create or coerce a protobuf request object. @@ -3410,20 +3426,22 @@ async def update_cmek_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.CmekSettings: - r"""Updates the Log Router CMEK settings for the given resource. - - Note: CMEK for the Log Router can currently only be configured - for Google Cloud organizations. Once configured, it applies to - all projects and folders in the Google Cloud organization. + r"""Updates the Log Router CMEK settings for the given + resource. + Note: CMEK for the Log Router can currently only be + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3457,8 +3475,8 @@ async def sample_update_cmek_settings(): The request object. The parameters to [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -3470,18 +3488,21 @@ async def sample_update_cmek_settings(): Returns: google.cloud.logging_v2.types.CmekSettings: - Describes the customer-managed encryption key (CMEK) settings associated with - a project, folder, organization, billing account, or - flexible resource. - - Note: CMEK for the Log Router can currently only be - configured for Google Cloud organizations. Once - configured, it applies to all projects and folders in - the Google Cloud organization. - - See [Enabling CMEK for Log - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Describes the customer-managed + encryption key (CMEK) settings + associated with a project, folder, + organization, billing account, or + flexible resource. + + Note: CMEK for the Log Router can + currently only be configured for Google + Cloud organizations. Once configured, it + applies to all projects and folders in + the Google Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ # Create or coerce a protobuf request object. @@ -3526,14 +3547,15 @@ async def get_settings(self, ) -> logging_config.Settings: r"""Gets the Log Router settings for the given resource. - Note: Settings for the Log Router can be get for Google Cloud - projects, folders, organizations and billing accounts. Currently - it can only be configured for organizations. Once configured for - an organization, it applies to all projects and folders in the - Google Cloud organization. + Note: Settings for the Log Router can be get for Google + Cloud projects, folders, organizations and billing + accounts. Currently it can only be configured for + organizations. Once configured for an organization, it + applies to all projects and folders in the Google Cloud + organization. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3567,28 +3589,28 @@ async def sample_get_settings(): The request object. The parameters to [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. name (:class:`str`): - Required. The resource for which to retrieve settings. - - :: - + Required. The resource for which to + retrieve settings. "projects/[PROJECT_ID]/settings" - "organizations/[ORGANIZATION_ID]/settings" - "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - "folders/[FOLDER_ID]/settings" + "organizations/[ORGANIZATION_ID]/settings" + "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + "folders/[FOLDER_ID]/settings" For example: - ``"organizations/12345/settings"`` + `"organizations/12345/settings"` - Note: Settings for the Log Router can be get for Google - Cloud projects, folders, organizations and billing - accounts. Currently it can only be configured for - organizations. Once configured for an organization, it - applies to all projects and folders in the Google Cloud + Note: Settings for the Log Router can be + get for Google Cloud projects, folders, + organizations and billing accounts. + Currently it can only be configured for + organizations. Once configured for an + organization, it applies to all projects + and folders in the Google Cloud organization. This corresponds to the ``name`` field @@ -3663,23 +3685,23 @@ async def update_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.Settings: - r"""Updates the Log Router settings for the given resource. - + r"""Updates the Log Router settings for the given + resource. Note: Settings for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, it - applies to all projects and folders in the Google Cloud - organization. + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. 4) ``location_id`` - is not supported by Logging. 5) ``location_id`` violate - OrgPolicy. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. 4) `location_id` is not supported by Logging. + 5) `location_id` violate OrgPolicy. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3713,29 +3735,31 @@ async def sample_update_settings(): The request object. The parameters to [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. settings (:class:`google.cloud.logging_v2.types.Settings`): Required. The settings to update. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. This corresponds to the ``settings`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Optional. Field mask identifying which fields from - ``settings`` should be updated. A field will be - overwritten if and only if it is in the update mask. + Optional. Field mask identifying + which fields from `settings` should be + updated. A field will be overwritten if + and only if it is in the update mask. Output only fields cannot be updated. - See [FieldMask][google.protobuf.FieldMask] for more - information. + See + [FieldMask][google.protobuf.FieldMask] + for more information. - For example: ``"updateMask=kmsKeyName"`` + For example: `"updateMask=kmsKeyName"` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -3856,12 +3880,13 @@ async def sample_copy_log_entries(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.CopyLogEntriesResponse` - Response type for CopyLogEntries long running - operations. + Response type for CopyLogEntries long + running operations. """ # Create or coerce a protobuf request object. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py index b6f74fe614..510733347c 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py @@ -705,20 +705,18 @@ def sample_list_buckets(): Args: request (Union[google.cloud.logging_v2.types.ListBucketsRequest, dict]): - The request object. The parameters to ``ListBuckets``. + The request object. The parameters to `ListBuckets`. parent (str): - Required. The parent resource whose buckets are to be - listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - - Note: The locations portion of the resource must be - specified, but supplying the character ``-`` in place of + Required. The parent resource whose + buckets are to be listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + + Note: The locations portion of the + resource must be specified, but + supplying the character `-` in place of [LOCATION_ID] will return all buckets. This corresponds to the ``parent`` field @@ -833,7 +831,7 @@ def sample_get_bucket(): Args: request (Union[google.cloud.logging_v2.types.GetBucketRequest, dict]): - The request object. The parameters to ``GetBucket``. + The request object. The parameters to `GetBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -925,7 +923,7 @@ def sample_create_bucket_async(): Args: request (Union[google.cloud.logging_v2.types.CreateBucketRequest, dict]): - The request object. The parameters to ``CreateBucket``. + The request object. The parameters to `CreateBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -936,11 +934,13 @@ def sample_create_bucket_async(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.LogBucket` - Describes a repository in which log entries are stored. + Describes a repository in which log + entries are stored. """ # Create or coerce a protobuf request object. @@ -992,11 +992,12 @@ def update_bucket_async(self, ) -> operation.Operation: r"""Updates a log bucket asynchronously. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. .. code-block:: python @@ -1030,7 +1031,7 @@ def sample_update_bucket_async(): Args: request (Union[google.cloud.logging_v2.types.UpdateBucketRequest, dict]): - The request object. The parameters to ``UpdateBucket``. + The request object. The parameters to `UpdateBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1041,11 +1042,13 @@ def sample_update_bucket_async(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.LogBucket` - Describes a repository in which log entries are stored. + Describes a repository in which log + entries are stored. """ # Create or coerce a protobuf request object. @@ -1128,7 +1131,7 @@ def sample_create_bucket(): Args: request (Union[google.cloud.logging_v2.types.CreateBucketRequest, dict]): - The request object. The parameters to ``CreateBucket``. + The request object. The parameters to `CreateBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1184,11 +1187,12 @@ def update_bucket(self, ) -> logging_config.LogBucket: r"""Updates a log bucket. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. .. code-block:: python @@ -1218,7 +1222,7 @@ def sample_update_bucket(): Args: request (Union[google.cloud.logging_v2.types.UpdateBucketRequest, dict]): - The request object. The parameters to ``UpdateBucket``. + The request object. The parameters to `UpdateBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1274,10 +1278,10 @@ def delete_bucket(self, ) -> None: r"""Deletes a log bucket. - Changes the bucket's ``lifecycle_state`` to the - ``DELETE_REQUESTED`` state. After 7 days, the bucket will be - purged and all log entries in the bucket will be permanently - deleted. + Changes the bucket's `lifecycle_state` to the + `DELETE_REQUESTED` state. After 7 days, the bucket will + be purged and all log entries in the bucket will be + permanently deleted. .. code-block:: python @@ -1304,7 +1308,7 @@ def sample_delete_bucket(): Args: request (Union[google.cloud.logging_v2.types.DeleteBucketRequest, dict]): - The request object. The parameters to ``DeleteBucket``. + The request object. The parameters to `DeleteBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1378,7 +1382,7 @@ def sample_undelete_bucket(): Args: request (Union[google.cloud.logging_v2.types.UndeleteBucketRequest, dict]): - The request object. The parameters to ``UndeleteBucket``. + The request object. The parameters to `UndeleteBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1455,13 +1459,11 @@ def sample_list_views(): Args: request (Union[google.cloud.logging_v2.types.ListViewsRequest, dict]): - The request object. The parameters to ``ListViews``. + The request object. The parameters to `ListViews`. parent (str): - Required. The bucket whose views are to be listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The bucket whose views are + to be listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1575,7 +1577,7 @@ def sample_get_view(): Args: request (Union[google.cloud.logging_v2.types.GetViewRequest, dict]): - The request object. The parameters to ``GetView``. + The request object. The parameters to `GetView`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1661,7 +1663,7 @@ def sample_create_view(): Args: request (Union[google.cloud.logging_v2.types.CreateViewRequest, dict]): - The request object. The parameters to ``CreateView``. + The request object. The parameters to `CreateView`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1715,11 +1717,12 @@ def update_view(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogView: - r"""Updates a view on a log bucket. This method replaces the - following fields in the existing view with values from the new - view: ``filter``. If an ``UNAVAILABLE`` error is returned, this - indicates that system is not in a state where it can update the - view. If this occurs, please try again in a few minutes. + r"""Updates a view on a log bucket. This method replaces + the following fields in the existing view with values + from the new view: `filter`. If an `UNAVAILABLE` error + is returned, this indicates that system is not in a + state where it can update the view. If this occurs, + please try again in a few minutes. .. code-block:: python @@ -1749,7 +1752,7 @@ def sample_update_view(): Args: request (Union[google.cloud.logging_v2.types.UpdateViewRequest, dict]): - The request object. The parameters to ``UpdateView``. + The request object. The parameters to `UpdateView`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1803,10 +1806,10 @@ def delete_view(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a view on a log bucket. If an ``UNAVAILABLE`` error is - returned, this indicates that system is not in a state where it - can delete the view. If this occurs, please try again in a few - minutes. + r"""Deletes a view on a log bucket. + If an `UNAVAILABLE` error is returned, this indicates + that system is not in a state where it can delete the + view. If this occurs, please try again in a few minutes. .. code-block:: python @@ -1833,7 +1836,7 @@ def sample_delete_view(): Args: request (Union[google.cloud.logging_v2.types.DeleteViewRequest, dict]): - The request object. The parameters to ``DeleteView``. + The request object. The parameters to `DeleteView`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1910,17 +1913,14 @@ def sample_list_sinks(): Args: request (Union[google.cloud.logging_v2.types.ListSinksRequest, dict]): - The request object. The parameters to ``ListSinks``. + The request object. The parameters to `ListSinks`. parent (str): - Required. The parent resource whose sinks are to be - listed: - - :: - + Required. The parent resource whose + sinks are to be listed: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1935,10 +1935,11 @@ def sample_list_sinks(): Returns: google.cloud.logging_v2.services.config_service_v2.pagers.ListSinksPager: - Result returned from ListSinks. + Result returned from `ListSinks`. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -2034,20 +2035,18 @@ def sample_get_sink(): Args: request (Union[google.cloud.logging_v2.types.GetSinkRequest, dict]): - The request object. The parameters to ``GetSink``. + The request object. The parameters to `GetSink`. sink_name (str): - Required. The resource name of the sink: - - :: - - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + Required. The resource name of the + sink: + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -2126,11 +2125,12 @@ def create_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogSink: - r"""Creates a sink that exports specified log entries to a - destination. The export of newly-ingested log entries begins - immediately, unless the sink's ``writer_identity`` is not - permitted to write to the destination. A sink can export log - entries only from the resource owning the sink. + r"""Creates a sink that exports specified log entries to + a destination. The export of newly-ingested log entries + begins immediately, unless the sink's `writer_identity` + is not permitted to write to the destination. A sink can + export log entries only from the resource owning the + sink. .. code-block:: python @@ -2165,27 +2165,27 @@ def sample_create_sink(): Args: request (Union[google.cloud.logging_v2.types.CreateSinkRequest, dict]): - The request object. The parameters to ``CreateSink``. + The request object. The parameters to `CreateSink`. parent (str): - Required. The resource in which to create the sink: - - :: - + Required. The resource in which to + create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" For examples: - ``"projects/my-project"`` ``"organizations/123456789"`` + `"projects/my-project"` + `"organizations/123456789"` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. sink (google.cloud.logging_v2.types.LogSink): - Required. The new sink, whose ``name`` parameter is a - sink identifier that is not already in use. + Required. The new sink, whose `name` + parameter is a sink identifier that is + not already in use. This corresponds to the ``sink`` field on the ``request`` instance; if ``request`` is provided, this @@ -2267,12 +2267,13 @@ def update_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogSink: - r"""Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, - and ``filter``. + r"""Updates a sink. This method replaces the following + fields in the existing sink with values from the new + sink: `destination`, and `filter`. - The updated sink might also have a new ``writer_identity``; see - the ``unique_writer_identity`` field. + The updated sink might also have a new + `writer_identity`; see the `unique_writer_identity` + field. .. code-block:: python @@ -2307,50 +2308,55 @@ def sample_update_sink(): Args: request (Union[google.cloud.logging_v2.types.UpdateSinkRequest, dict]): - The request object. The parameters to ``UpdateSink``. + The request object. The parameters to `UpdateSink`. sink_name (str): - Required. The full resource name of the sink to update, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of + the sink to update, including the parent + resource and the sink identifier: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. sink (google.cloud.logging_v2.types.LogSink): - Required. The updated sink, whose name is the same - identifier that appears as part of ``sink_name``. + Required. The updated sink, whose + name is the same identifier that appears + as part of `sink_name`. This corresponds to the ``sink`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask that specifies the fields in - ``sink`` that need an update. A sink field will be - overwritten if, and only if, it is in the update mask. - ``name`` and output only fields cannot be updated. + Optional. Field mask that specifies + the fields in `sink` that need an + update. A sink field will be overwritten + if, and only if, it is in the update + mask. `name` and output only fields + cannot be updated. - An empty ``updateMask`` is temporarily treated as using - the following mask for backwards compatibility purposes: + An empty `updateMask` is temporarily + treated as using the following mask for + backwards compatibility purposes: - ``destination,filter,includeChildren`` + `destination,filter,includeChildren` - At some point in the future, behavior will be removed - and specifying an empty ``updateMask`` will be an error. + At some point in the future, behavior + will be removed and specifying an empty + `updateMask` will be an error. - For a detailed ``FieldMask`` definition, see + For a detailed `FieldMask` definition, + see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - For example: ``updateMask=filter`` + For example: `updateMask=filter` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -2432,8 +2438,9 @@ def delete_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a sink. If the sink has a unique ``writer_identity``, - then that service account is also deleted. + r"""Deletes a sink. If the sink has a unique + `writer_identity`, then that service account is also + deleted. .. code-block:: python @@ -2460,21 +2467,20 @@ def sample_delete_sink(): Args: request (Union[google.cloud.logging_v2.types.DeleteSinkRequest, dict]): - The request object. The parameters to ``DeleteSink``. + The request object. The parameters to `DeleteSink`. sink_name (str): - Required. The full resource name of the sink to delete, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of + the sink to delete, including the parent + resource and the sink identifier: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -2578,15 +2584,12 @@ def sample_create_link(): request (Union[google.cloud.logging_v2.types.CreateLinkRequest, dict]): The request object. The parameters to CreateLink. parent (str): - Required. The full resource name of the bucket to create - a link for. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The full resource name of + the bucket to create a link for. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -2597,9 +2600,11 @@ def sample_create_link(): on the ``request`` instance; if ``request`` is provided, this should not be set. link_id (str): - Required. The ID to use for the link. The link_id can - have up to 100 characters. A valid link_id must only - have alphanumeric characters and underscores within it. + Required. The ID to use for the link. + The link_id can have up to 100 + characters. A valid link_id must only + have alphanumeric characters and + underscores within it. This corresponds to the ``link_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -2614,11 +2619,13 @@ def sample_create_link(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.logging_v2.types.Link` Describes a - link connected to an analytics enabled bucket. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.logging_v2.types.Link` + Describes a link connected to an + analytics enabled bucket. """ # Create or coerce a protobuf request object. @@ -2722,8 +2729,8 @@ def sample_delete_link(): request (Union[google.cloud.logging_v2.types.DeleteLinkRequest, dict]): The request object. The parameters to DeleteLink. name (str): - Required. The full resource name of the link to delete. - + Required. The full resource name of + the link to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" @@ -2742,18 +2749,21 @@ def sample_delete_link(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -2849,9 +2859,8 @@ def sample_list_links(): request (Union[google.cloud.logging_v2.types.ListLinksRequest, dict]): The request object. The parameters to ListLinks. parent (str): - Required. The parent resource whose links are to be - listed: - + Required. The parent resource whose + links are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" @@ -2972,8 +2981,8 @@ def sample_get_link(): request (Union[google.cloud.logging_v2.types.GetLinkRequest, dict]): The request object. The parameters to GetLink. name (str): - Required. The resource name of the link: - + Required. The resource name of the + link: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" @@ -3048,8 +3057,8 @@ def list_exclusions(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListExclusionsPager: - r"""Lists all the exclusions on the \_Default sink in a parent - resource. + r"""Lists all the exclusions on the _Default sink in a + parent resource. .. code-block:: python @@ -3080,17 +3089,14 @@ def sample_list_exclusions(): Args: request (Union[google.cloud.logging_v2.types.ListExclusionsRequest, dict]): - The request object. The parameters to ``ListExclusions``. + The request object. The parameters to `ListExclusions`. parent (str): - Required. The parent resource whose exclusions are to be - listed. - - :: - + Required. The parent resource whose + exclusions are to be listed. "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -3105,10 +3111,11 @@ def sample_list_exclusions(): Returns: google.cloud.logging_v2.services.config_service_v2.pagers.ListExclusionsPager: - Result returned from ListExclusions. - - Iterating over this object will yield results and - resolve additional pages automatically. + Result returned from + `ListExclusions`. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -3174,7 +3181,8 @@ def get_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Gets the description of an exclusion in the \_Default sink. + r"""Gets the description of an exclusion in the _Default + sink. .. code-block:: python @@ -3204,20 +3212,18 @@ def sample_get_exclusion(): Args: request (Union[google.cloud.logging_v2.types.GetExclusionRequest, dict]): - The request object. The parameters to ``GetExclusion``. + The request object. The parameters to `GetExclusion`. name (str): - Required. The resource name of an existing exclusion: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of an + existing exclusion: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -3232,13 +3238,16 @@ def sample_get_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -3294,9 +3303,10 @@ def create_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Creates a new exclusion in the \_Default sink in a specified - parent resource. Only log entries belonging to that resource can - be excluded. You can have up to 10 exclusions in a resource. + r"""Creates a new exclusion in the _Default sink in a + specified parent resource. Only log entries belonging to + that resource can be excluded. You can have up to 10 + exclusions in a resource. .. code-block:: python @@ -3331,29 +3341,27 @@ def sample_create_exclusion(): Args: request (Union[google.cloud.logging_v2.types.CreateExclusionRequest, dict]): - The request object. The parameters to ``CreateExclusion``. + The request object. The parameters to `CreateExclusion`. parent (str): - Required. The parent resource in which to create the - exclusion: - - :: - + Required. The parent resource in + which to create the exclusion: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" For examples: - ``"projects/my-logging-project"`` - ``"organizations/123456789"`` + `"projects/my-logging-project"` + `"organizations/123456789"` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. exclusion (google.cloud.logging_v2.types.LogExclusion): - Required. The new exclusion, whose ``name`` parameter is - an exclusion name that is not already used in the parent + Required. The new exclusion, whose + `name` parameter is an exclusion name + that is not already used in the parent resource. This corresponds to the ``exclusion`` field @@ -3369,13 +3377,16 @@ def sample_create_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -3434,8 +3445,8 @@ def update_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Changes one or more properties of an existing exclusion in the - \_Default sink. + r"""Changes one or more properties of an existing + exclusion in the _Default sink. .. code-block:: python @@ -3470,42 +3481,43 @@ def sample_update_exclusion(): Args: request (Union[google.cloud.logging_v2.types.UpdateExclusionRequest, dict]): - The request object. The parameters to ``UpdateExclusion``. + The request object. The parameters to `UpdateExclusion`. name (str): - Required. The resource name of the exclusion to update: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of the + exclusion to update: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. exclusion (google.cloud.logging_v2.types.LogExclusion): - Required. New values for the existing exclusion. Only - the fields specified in ``update_mask`` are relevant. + Required. New values for the existing + exclusion. Only the fields specified in + `update_mask` are relevant. This corresponds to the ``exclusion`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Required. A non-empty list of fields to change in the - existing exclusion. New values for the fields are taken - from the corresponding fields in the - [LogExclusion][google.logging.v2.LogExclusion] included - in this request. Fields not mentioned in ``update_mask`` - are not changed and are ignored in the request. - - For example, to change the filter and description of an - exclusion, specify an ``update_mask`` of - ``"filter,description"``. + Required. A non-empty list of fields + to change in the existing exclusion. New + values for the fields are taken from the + corresponding fields in the + [LogExclusion][google.logging.v2.LogExclusion] + included in this request. Fields not + mentioned in `update_mask` are not + changed and are ignored in the request. + + For example, to change the filter and + description of an exclusion, specify an + `update_mask` of `"filter,description"`. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -3520,13 +3532,16 @@ def sample_update_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -3585,7 +3600,7 @@ def delete_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes an exclusion in the \_Default sink. + r"""Deletes an exclusion in the _Default sink. .. code-block:: python @@ -3612,21 +3627,18 @@ def sample_delete_exclusion(): Args: request (Union[google.cloud.logging_v2.types.DeleteExclusionRequest, dict]): - The request object. The parameters to ``DeleteExclusion``. + The request object. The parameters to `DeleteExclusion`. name (str): - Required. The resource name of an existing exclusion to - delete: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of an + existing exclusion to delete: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -3687,15 +3699,16 @@ def get_cmek_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.CmekSettings: - r"""Gets the Logging CMEK settings for the given resource. - - Note: CMEK for the Log Router can be configured for Google Cloud - projects, folders, organizations and billing accounts. Once - configured for an organization, it applies to all projects and - folders in the Google Cloud organization. - - See `Enabling CMEK for Log - Router `__ + r"""Gets the Logging CMEK settings for the given + resource. + Note: CMEK for the Log Router can be configured for + Google Cloud projects, folders, organizations and + billing accounts. Once configured for an organization, + it applies to all projects and folders in the Google + Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3729,8 +3742,8 @@ def sample_get_cmek_settings(): The request object. The parameters to [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3742,18 +3755,21 @@ def sample_get_cmek_settings(): Returns: google.cloud.logging_v2.types.CmekSettings: - Describes the customer-managed encryption key (CMEK) settings associated with - a project, folder, organization, billing account, or - flexible resource. - - Note: CMEK for the Log Router can currently only be - configured for Google Cloud organizations. Once - configured, it applies to all projects and folders in - the Google Cloud organization. - - See [Enabling CMEK for Log - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Describes the customer-managed + encryption key (CMEK) settings + associated with a project, folder, + organization, billing account, or + flexible resource. + + Note: CMEK for the Log Router can + currently only be configured for Google + Cloud organizations. Once configured, it + applies to all projects and folders in + the Google Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ # Create or coerce a protobuf request object. @@ -3795,20 +3811,22 @@ def update_cmek_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.CmekSettings: - r"""Updates the Log Router CMEK settings for the given resource. - - Note: CMEK for the Log Router can currently only be configured - for Google Cloud organizations. Once configured, it applies to - all projects and folders in the Google Cloud organization. + r"""Updates the Log Router CMEK settings for the given + resource. + Note: CMEK for the Log Router can currently only be + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3842,8 +3860,8 @@ def sample_update_cmek_settings(): The request object. The parameters to [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3855,18 +3873,21 @@ def sample_update_cmek_settings(): Returns: google.cloud.logging_v2.types.CmekSettings: - Describes the customer-managed encryption key (CMEK) settings associated with - a project, folder, organization, billing account, or - flexible resource. - - Note: CMEK for the Log Router can currently only be - configured for Google Cloud organizations. Once - configured, it applies to all projects and folders in - the Google Cloud organization. - - See [Enabling CMEK for Log - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Describes the customer-managed + encryption key (CMEK) settings + associated with a project, folder, + organization, billing account, or + flexible resource. + + Note: CMEK for the Log Router can + currently only be configured for Google + Cloud organizations. Once configured, it + applies to all projects and folders in + the Google Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ # Create or coerce a protobuf request object. @@ -3911,14 +3932,15 @@ def get_settings(self, ) -> logging_config.Settings: r"""Gets the Log Router settings for the given resource. - Note: Settings for the Log Router can be get for Google Cloud - projects, folders, organizations and billing accounts. Currently - it can only be configured for organizations. Once configured for - an organization, it applies to all projects and folders in the - Google Cloud organization. + Note: Settings for the Log Router can be get for Google + Cloud projects, folders, organizations and billing + accounts. Currently it can only be configured for + organizations. Once configured for an organization, it + applies to all projects and folders in the Google Cloud + organization. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3952,28 +3974,28 @@ def sample_get_settings(): The request object. The parameters to [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. name (str): - Required. The resource for which to retrieve settings. - - :: - + Required. The resource for which to + retrieve settings. "projects/[PROJECT_ID]/settings" - "organizations/[ORGANIZATION_ID]/settings" - "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - "folders/[FOLDER_ID]/settings" + "organizations/[ORGANIZATION_ID]/settings" + "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + "folders/[FOLDER_ID]/settings" For example: - ``"organizations/12345/settings"`` + `"organizations/12345/settings"` - Note: Settings for the Log Router can be get for Google - Cloud projects, folders, organizations and billing - accounts. Currently it can only be configured for - organizations. Once configured for an organization, it - applies to all projects and folders in the Google Cloud + Note: Settings for the Log Router can be + get for Google Cloud projects, folders, + organizations and billing accounts. + Currently it can only be configured for + organizations. Once configured for an + organization, it applies to all projects + and folders in the Google Cloud organization. This corresponds to the ``name`` field @@ -4047,23 +4069,23 @@ def update_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.Settings: - r"""Updates the Log Router settings for the given resource. - + r"""Updates the Log Router settings for the given + resource. Note: Settings for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, it - applies to all projects and folders in the Google Cloud - organization. + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. 4) ``location_id`` - is not supported by Logging. 5) ``location_id`` violate - OrgPolicy. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. 4) `location_id` is not supported by Logging. + 5) `location_id` violate OrgPolicy. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -4097,29 +4119,31 @@ def sample_update_settings(): The request object. The parameters to [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. settings (google.cloud.logging_v2.types.Settings): Required. The settings to update. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. This corresponds to the ``settings`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask identifying which fields from - ``settings`` should be updated. A field will be - overwritten if and only if it is in the update mask. + Optional. Field mask identifying + which fields from `settings` should be + updated. A field will be overwritten if + and only if it is in the update mask. Output only fields cannot be updated. - See [FieldMask][google.protobuf.FieldMask] for more - information. + See + [FieldMask][google.protobuf.FieldMask] + for more information. - For example: ``"updateMask=kmsKeyName"`` + For example: `"updateMask=kmsKeyName"` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -4239,12 +4263,13 @@ def sample_copy_log_entries(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.CopyLogEntriesResponse` - Response type for CopyLogEntries long running - operations. + Response type for CopyLogEntries long + running operations. """ # Create or coerce a protobuf request object. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py index ac3a4393a8..e820e07dca 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py @@ -418,11 +418,12 @@ def update_bucket_async(self) -> Callable[ Updates a log bucket asynchronously. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. Returns: Callable[[~.UpdateBucketRequest], @@ -478,11 +479,12 @@ def update_bucket(self) -> Callable[ Updates a log bucket. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. Returns: Callable[[~.UpdateBucketRequest], @@ -510,10 +512,10 @@ def delete_bucket(self) -> Callable[ Deletes a log bucket. - Changes the bucket's ``lifecycle_state`` to the - ``DELETE_REQUESTED`` state. After 7 days, the bucket will be - purged and all log entries in the bucket will be permanently - deleted. + Changes the bucket's `lifecycle_state` to the + `DELETE_REQUESTED` state. After 7 days, the bucket will + be purged and all log entries in the bucket will be + permanently deleted. Returns: Callable[[~.DeleteBucketRequest], @@ -646,11 +648,12 @@ def update_view(self) -> Callable[ logging_config.LogView]: r"""Return a callable for the update view method over gRPC. - Updates a view on a log bucket. This method replaces the - following fields in the existing view with values from the new - view: ``filter``. If an ``UNAVAILABLE`` error is returned, this - indicates that system is not in a state where it can update the - view. If this occurs, please try again in a few minutes. + Updates a view on a log bucket. This method replaces + the following fields in the existing view with values + from the new view: `filter`. If an `UNAVAILABLE` error + is returned, this indicates that system is not in a + state where it can update the view. If this occurs, + please try again in a few minutes. Returns: Callable[[~.UpdateViewRequest], @@ -676,10 +679,10 @@ def delete_view(self) -> Callable[ empty_pb2.Empty]: r"""Return a callable for the delete view method over gRPC. - Deletes a view on a log bucket. If an ``UNAVAILABLE`` error is - returned, this indicates that system is not in a state where it - can delete the view. If this occurs, please try again in a few - minutes. + Deletes a view on a log bucket. + If an `UNAVAILABLE` error is returned, this indicates + that system is not in a state where it can delete the + view. If this occurs, please try again in a few minutes. Returns: Callable[[~.DeleteViewRequest], @@ -757,11 +760,12 @@ def create_sink(self) -> Callable[ logging_config.LogSink]: r"""Return a callable for the create sink method over gRPC. - Creates a sink that exports specified log entries to a - destination. The export of newly-ingested log entries begins - immediately, unless the sink's ``writer_identity`` is not - permitted to write to the destination. A sink can export log - entries only from the resource owning the sink. + Creates a sink that exports specified log entries to + a destination. The export of newly-ingested log entries + begins immediately, unless the sink's `writer_identity` + is not permitted to write to the destination. A sink can + export log entries only from the resource owning the + sink. Returns: Callable[[~.CreateSinkRequest], @@ -787,12 +791,13 @@ def update_sink(self) -> Callable[ logging_config.LogSink]: r"""Return a callable for the update sink method over gRPC. - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, - and ``filter``. + Updates a sink. This method replaces the following + fields in the existing sink with values from the new + sink: `destination`, and `filter`. - The updated sink might also have a new ``writer_identity``; see - the ``unique_writer_identity`` field. + The updated sink might also have a new + `writer_identity`; see the `unique_writer_identity` + field. Returns: Callable[[~.UpdateSinkRequest], @@ -818,8 +823,9 @@ def delete_sink(self) -> Callable[ empty_pb2.Empty]: r"""Return a callable for the delete sink method over gRPC. - Deletes a sink. If the sink has a unique ``writer_identity``, - then that service account is also deleted. + Deletes a sink. If the sink has a unique + `writer_identity`, then that service account is also + deleted. Returns: Callable[[~.DeleteSinkRequest], @@ -953,8 +959,8 @@ def list_exclusions(self) -> Callable[ logging_config.ListExclusionsResponse]: r"""Return a callable for the list exclusions method over gRPC. - Lists all the exclusions on the \_Default sink in a parent - resource. + Lists all the exclusions on the _Default sink in a + parent resource. Returns: Callable[[~.ListExclusionsRequest], @@ -980,7 +986,8 @@ def get_exclusion(self) -> Callable[ logging_config.LogExclusion]: r"""Return a callable for the get exclusion method over gRPC. - Gets the description of an exclusion in the \_Default sink. + Gets the description of an exclusion in the _Default + sink. Returns: Callable[[~.GetExclusionRequest], @@ -1006,9 +1013,10 @@ def create_exclusion(self) -> Callable[ logging_config.LogExclusion]: r"""Return a callable for the create exclusion method over gRPC. - Creates a new exclusion in the \_Default sink in a specified - parent resource. Only log entries belonging to that resource can - be excluded. You can have up to 10 exclusions in a resource. + Creates a new exclusion in the _Default sink in a + specified parent resource. Only log entries belonging to + that resource can be excluded. You can have up to 10 + exclusions in a resource. Returns: Callable[[~.CreateExclusionRequest], @@ -1034,8 +1042,8 @@ def update_exclusion(self) -> Callable[ logging_config.LogExclusion]: r"""Return a callable for the update exclusion method over gRPC. - Changes one or more properties of an existing exclusion in the - \_Default sink. + Changes one or more properties of an existing + exclusion in the _Default sink. Returns: Callable[[~.UpdateExclusionRequest], @@ -1061,7 +1069,7 @@ def delete_exclusion(self) -> Callable[ empty_pb2.Empty]: r"""Return a callable for the delete exclusion method over gRPC. - Deletes an exclusion in the \_Default sink. + Deletes an exclusion in the _Default sink. Returns: Callable[[~.DeleteExclusionRequest], @@ -1087,15 +1095,16 @@ def get_cmek_settings(self) -> Callable[ logging_config.CmekSettings]: r"""Return a callable for the get cmek settings method over gRPC. - Gets the Logging CMEK settings for the given resource. - - Note: CMEK for the Log Router can be configured for Google Cloud - projects, folders, organizations and billing accounts. Once - configured for an organization, it applies to all projects and - folders in the Google Cloud organization. - - See `Enabling CMEK for Log - Router `__ + Gets the Logging CMEK settings for the given + resource. + Note: CMEK for the Log Router can be configured for + Google Cloud projects, folders, organizations and + billing accounts. Once configured for an organization, + it applies to all projects and folders in the Google + Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1122,20 +1131,22 @@ def update_cmek_settings(self) -> Callable[ logging_config.CmekSettings]: r"""Return a callable for the update cmek settings method over gRPC. - Updates the Log Router CMEK settings for the given resource. - - Note: CMEK for the Log Router can currently only be configured - for Google Cloud organizations. Once configured, it applies to - all projects and folders in the Google Cloud organization. + Updates the Log Router CMEK settings for the given + resource. + Note: CMEK for the Log Router can currently only be + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1164,14 +1175,15 @@ def get_settings(self) -> Callable[ Gets the Log Router settings for the given resource. - Note: Settings for the Log Router can be get for Google Cloud - projects, folders, organizations and billing accounts. Currently - it can only be configured for organizations. Once configured for - an organization, it applies to all projects and folders in the - Google Cloud organization. + Note: Settings for the Log Router can be get for Google + Cloud projects, folders, organizations and billing + accounts. Currently it can only be configured for + organizations. Once configured for an organization, it + applies to all projects and folders in the Google Cloud + organization. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1198,23 +1210,23 @@ def update_settings(self) -> Callable[ logging_config.Settings]: r"""Return a callable for the update settings method over gRPC. - Updates the Log Router settings for the given resource. - + Updates the Log Router settings for the given + resource. Note: Settings for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, it - applies to all projects and folders in the Google Cloud - organization. + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. 4) ``location_id`` - is not supported by Logging. 5) ``location_id`` violate - OrgPolicy. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. 4) `location_id` is not supported by Logging. + 5) `location_id` violate OrgPolicy. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py index fc7af0c06b..d7b5cd4bd7 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py @@ -424,11 +424,12 @@ def update_bucket_async(self) -> Callable[ Updates a log bucket asynchronously. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. Returns: Callable[[~.UpdateBucketRequest], @@ -484,11 +485,12 @@ def update_bucket(self) -> Callable[ Updates a log bucket. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. Returns: Callable[[~.UpdateBucketRequest], @@ -516,10 +518,10 @@ def delete_bucket(self) -> Callable[ Deletes a log bucket. - Changes the bucket's ``lifecycle_state`` to the - ``DELETE_REQUESTED`` state. After 7 days, the bucket will be - purged and all log entries in the bucket will be permanently - deleted. + Changes the bucket's `lifecycle_state` to the + `DELETE_REQUESTED` state. After 7 days, the bucket will + be purged and all log entries in the bucket will be + permanently deleted. Returns: Callable[[~.DeleteBucketRequest], @@ -652,11 +654,12 @@ def update_view(self) -> Callable[ Awaitable[logging_config.LogView]]: r"""Return a callable for the update view method over gRPC. - Updates a view on a log bucket. This method replaces the - following fields in the existing view with values from the new - view: ``filter``. If an ``UNAVAILABLE`` error is returned, this - indicates that system is not in a state where it can update the - view. If this occurs, please try again in a few minutes. + Updates a view on a log bucket. This method replaces + the following fields in the existing view with values + from the new view: `filter`. If an `UNAVAILABLE` error + is returned, this indicates that system is not in a + state where it can update the view. If this occurs, + please try again in a few minutes. Returns: Callable[[~.UpdateViewRequest], @@ -682,10 +685,10 @@ def delete_view(self) -> Callable[ Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete view method over gRPC. - Deletes a view on a log bucket. If an ``UNAVAILABLE`` error is - returned, this indicates that system is not in a state where it - can delete the view. If this occurs, please try again in a few - minutes. + Deletes a view on a log bucket. + If an `UNAVAILABLE` error is returned, this indicates + that system is not in a state where it can delete the + view. If this occurs, please try again in a few minutes. Returns: Callable[[~.DeleteViewRequest], @@ -763,11 +766,12 @@ def create_sink(self) -> Callable[ Awaitable[logging_config.LogSink]]: r"""Return a callable for the create sink method over gRPC. - Creates a sink that exports specified log entries to a - destination. The export of newly-ingested log entries begins - immediately, unless the sink's ``writer_identity`` is not - permitted to write to the destination. A sink can export log - entries only from the resource owning the sink. + Creates a sink that exports specified log entries to + a destination. The export of newly-ingested log entries + begins immediately, unless the sink's `writer_identity` + is not permitted to write to the destination. A sink can + export log entries only from the resource owning the + sink. Returns: Callable[[~.CreateSinkRequest], @@ -793,12 +797,13 @@ def update_sink(self) -> Callable[ Awaitable[logging_config.LogSink]]: r"""Return a callable for the update sink method over gRPC. - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, - and ``filter``. + Updates a sink. This method replaces the following + fields in the existing sink with values from the new + sink: `destination`, and `filter`. - The updated sink might also have a new ``writer_identity``; see - the ``unique_writer_identity`` field. + The updated sink might also have a new + `writer_identity`; see the `unique_writer_identity` + field. Returns: Callable[[~.UpdateSinkRequest], @@ -824,8 +829,9 @@ def delete_sink(self) -> Callable[ Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete sink method over gRPC. - Deletes a sink. If the sink has a unique ``writer_identity``, - then that service account is also deleted. + Deletes a sink. If the sink has a unique + `writer_identity`, then that service account is also + deleted. Returns: Callable[[~.DeleteSinkRequest], @@ -959,8 +965,8 @@ def list_exclusions(self) -> Callable[ Awaitable[logging_config.ListExclusionsResponse]]: r"""Return a callable for the list exclusions method over gRPC. - Lists all the exclusions on the \_Default sink in a parent - resource. + Lists all the exclusions on the _Default sink in a + parent resource. Returns: Callable[[~.ListExclusionsRequest], @@ -986,7 +992,8 @@ def get_exclusion(self) -> Callable[ Awaitable[logging_config.LogExclusion]]: r"""Return a callable for the get exclusion method over gRPC. - Gets the description of an exclusion in the \_Default sink. + Gets the description of an exclusion in the _Default + sink. Returns: Callable[[~.GetExclusionRequest], @@ -1012,9 +1019,10 @@ def create_exclusion(self) -> Callable[ Awaitable[logging_config.LogExclusion]]: r"""Return a callable for the create exclusion method over gRPC. - Creates a new exclusion in the \_Default sink in a specified - parent resource. Only log entries belonging to that resource can - be excluded. You can have up to 10 exclusions in a resource. + Creates a new exclusion in the _Default sink in a + specified parent resource. Only log entries belonging to + that resource can be excluded. You can have up to 10 + exclusions in a resource. Returns: Callable[[~.CreateExclusionRequest], @@ -1040,8 +1048,8 @@ def update_exclusion(self) -> Callable[ Awaitable[logging_config.LogExclusion]]: r"""Return a callable for the update exclusion method over gRPC. - Changes one or more properties of an existing exclusion in the - \_Default sink. + Changes one or more properties of an existing + exclusion in the _Default sink. Returns: Callable[[~.UpdateExclusionRequest], @@ -1067,7 +1075,7 @@ def delete_exclusion(self) -> Callable[ Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete exclusion method over gRPC. - Deletes an exclusion in the \_Default sink. + Deletes an exclusion in the _Default sink. Returns: Callable[[~.DeleteExclusionRequest], @@ -1093,15 +1101,16 @@ def get_cmek_settings(self) -> Callable[ Awaitable[logging_config.CmekSettings]]: r"""Return a callable for the get cmek settings method over gRPC. - Gets the Logging CMEK settings for the given resource. - - Note: CMEK for the Log Router can be configured for Google Cloud - projects, folders, organizations and billing accounts. Once - configured for an organization, it applies to all projects and - folders in the Google Cloud organization. - - See `Enabling CMEK for Log - Router `__ + Gets the Logging CMEK settings for the given + resource. + Note: CMEK for the Log Router can be configured for + Google Cloud projects, folders, organizations and + billing accounts. Once configured for an organization, + it applies to all projects and folders in the Google + Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1128,20 +1137,22 @@ def update_cmek_settings(self) -> Callable[ Awaitable[logging_config.CmekSettings]]: r"""Return a callable for the update cmek settings method over gRPC. - Updates the Log Router CMEK settings for the given resource. - - Note: CMEK for the Log Router can currently only be configured - for Google Cloud organizations. Once configured, it applies to - all projects and folders in the Google Cloud organization. + Updates the Log Router CMEK settings for the given + resource. + Note: CMEK for the Log Router can currently only be + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1170,14 +1181,15 @@ def get_settings(self) -> Callable[ Gets the Log Router settings for the given resource. - Note: Settings for the Log Router can be get for Google Cloud - projects, folders, organizations and billing accounts. Currently - it can only be configured for organizations. Once configured for - an organization, it applies to all projects and folders in the - Google Cloud organization. + Note: Settings for the Log Router can be get for Google + Cloud projects, folders, organizations and billing + accounts. Currently it can only be configured for + organizations. Once configured for an organization, it + applies to all projects and folders in the Google Cloud + organization. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1204,23 +1216,23 @@ def update_settings(self) -> Callable[ Awaitable[logging_config.Settings]]: r"""Return a callable for the update settings method over gRPC. - Updates the Log Router settings for the given resource. - + Updates the Log Router settings for the given + resource. Note: Settings for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, it - applies to all projects and folders in the Google Cloud - organization. + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. 4) ``location_id`` - is not supported by Logging. 5) ``location_id`` violate - OrgPolicy. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. 4) `location_id` is not supported by Logging. + 5) `location_id` violate OrgPolicy. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py index f84e9f6ec5..35d3873d71 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py @@ -258,11 +258,12 @@ async def delete_log(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes all the log entries in a log for the \_Default Log - Bucket. The log reappears if it receives new entries. Log - entries written shortly before the delete operation might not be - deleted. Entries received after the delete operation with a - timestamp before the operation will be deleted. + r"""Deletes all the log entries in a log for the _Default + Log Bucket. The log reappears if it receives new + entries. Log entries written shortly before the delete + operation might not be deleted. Entries received after + the delete operation with a timestamp before the + operation will be deleted. .. code-block:: python @@ -291,18 +292,22 @@ async def sample_delete_log(): request (Optional[Union[google.cloud.logging_v2.types.DeleteLogRequest, dict]]): The request object. The parameters to DeleteLog. log_name (:class:`str`): - Required. The resource name of the log to delete: - - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` - - ``[LOG_ID]`` must be URL-encoded. For example, - ``"projects/my-project-id/logs/syslog"``, - ``"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"``. - - For more information about log names, see + Required. The resource name of the + log to delete: + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` + + `[LOG_ID]` must be URL-encoded. For + example, + `"projects/my-project-id/logs/syslog"`, + `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + + For more information about log names, + see [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``log_name`` field @@ -410,87 +415,104 @@ async def sample_write_log_entries(): request (Optional[Union[google.cloud.logging_v2.types.WriteLogEntriesRequest, dict]]): The request object. The parameters to WriteLogEntries. log_name (:class:`str`): - Optional. A default log resource name that is assigned - to all log entries in ``entries`` that do not specify a - value for ``log_name``: - - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` + Optional. A default log resource name + that is assigned to all log entries in + `entries` that do not specify a value + for `log_name`: - ``[LOG_ID]`` must be URL-encoded. For example: + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` - :: + `[LOG_ID]` must be URL-encoded. For + example: "projects/my-project-id/logs/syslog" - "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - The permission ``logging.logEntries.create`` is needed - on each project, organization, billing account, or - folder that is receiving new log entries, whether the - resource is specified in ``logName`` or in an individual - log entry. + The permission + `logging.logEntries.create` is needed on + each project, organization, billing + account, or folder that is receiving new + log entries, whether the resource is + specified in `logName` or in an + individual log entry. This corresponds to the ``log_name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. resource (:class:`google.api.monitored_resource_pb2.MonitoredResource`): - Optional. A default monitored resource object that is - assigned to all log entries in ``entries`` that do not - specify a value for ``resource``. Example: - - :: + Optional. A default monitored + resource object that is assigned to all + log entries in `entries` that do not + specify a value for `resource`. Example: { "type": "gce_instance", "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + "zone": "us-central1-a", + "instance_id": "00000000000000000000" }} - See [LogEntry][google.logging.v2.LogEntry]. + See + [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. labels (:class:`MutableMapping[str, str]`): - Optional. Default labels that are added to the - ``labels`` field of all log entries in ``entries``. If a - log entry already has a label with the same key as a - label in this parameter, then the log entry's label is - not changed. See [LogEntry][google.logging.v2.LogEntry]. + Optional. Default labels that are + added to the `labels` field of all log + entries in `entries`. If a log entry + already has a label with the same key as + a label in this parameter, then the log + entry's label is not changed. See + [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``labels`` field on the ``request`` instance; if ``request`` is provided, this should not be set. entries (:class:`MutableSequence[google.cloud.logging_v2.types.LogEntry]`): - Required. The log entries to send to Logging. The order - of log entries in this list does not matter. Values - supplied in this method's ``log_name``, ``resource``, - and ``labels`` fields are copied into those log entries - in this list that do not include values for their - corresponding fields. For more information, see the - [LogEntry][google.logging.v2.LogEntry] type. - - If the ``timestamp`` or ``insert_id`` fields are missing - in log entries, then this method supplies the current - time or a unique identifier, respectively. The supplied - values are chosen so that, among the log entries that - did not supply their own values, the entries earlier in - the list will sort before the entries later in the list. - See the ``entries.list`` method. - - Log entries with timestamps that are more than the `logs - retention - period `__ in - the past or more than 24 hours in the future will not be - available when calling ``entries.list``. However, those - log entries can still be `exported with - LogSinks `__. - - To improve throughput and to avoid exceeding the `quota - limit `__ for - calls to ``entries.write``, you should try to include - several log entries in this list, rather than calling - this method for each individual log entry. + Required. The log entries to send to + Logging. The order of log entries in + this list does not matter. Values + supplied in this method's `log_name`, + `resource`, and `labels` fields are + copied into those log entries in this + list that do not include values for + their corresponding fields. For more + information, see the + [LogEntry][google.logging.v2.LogEntry] + type. + + If the `timestamp` or `insert_id` fields + are missing in log entries, then this + method supplies the current time or a + unique identifier, respectively. The + supplied values are chosen so that, + among the log entries that did not + supply their own values, the entries + earlier in the list will sort before the + entries later in the list. See the + `entries.list` method. + + Log entries with timestamps that are + more than the [logs retention + period](https://cloud.google.com/logging/quotas) + in the past or more than 24 hours in the + future will not be available when + calling `entries.list`. However, those + log entries can still be [exported with + LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + + To improve throughput and to avoid + exceeding the [quota + limit](https://cloud.google.com/logging/quotas) + for calls to `entries.write`, you should + try to include several log entries in + this list, rather than calling this + method for each individual log entry. This corresponds to the ``entries`` field on the ``request`` instance; if ``request`` is provided, this @@ -561,10 +583,11 @@ async def list_log_entries(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListLogEntriesAsyncPager: - r"""Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. - For ways to export log entries, see `Exporting - Logs `__. + r"""Lists log entries. Use this method to retrieve log + entries that originated from a + project/folder/organization/billing account. For ways + to export log entries, see [Exporting + Logs](https://cloud.google.com/logging/docs/export). .. code-block:: python @@ -595,50 +618,63 @@ async def sample_list_log_entries(): Args: request (Optional[Union[google.cloud.logging_v2.types.ListLogEntriesRequest, dict]]): - The request object. The parameters to ``ListLogEntries``. + The request object. The parameters to `ListLogEntries`. resource_names (:class:`MutableSequence[str]`): - Required. Names of one or more parent resources from - which to retrieve log entries: + Required. Names of one or more parent + resources from which to retrieve log + entries: - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` May alternatively be one or more views: - - ``projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` + * + `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - Projects listed in the ``project_ids`` field are added - to this list. A maximum of 100 resources may be - specified in a single request. + Projects listed in the `project_ids` + field are added to this list. A maximum + of 100 resources may be specified in a + single request. This corresponds to the ``resource_names`` field on the ``request`` instance; if ``request`` is provided, this should not be set. filter (:class:`str`): - Optional. Only log entries that match the filter are - returned. An empty filter matches all log entries in the - resources listed in ``resource_names``. Referencing a - parent resource that is not listed in ``resource_names`` - will cause the filter to return no results. The maximum - length of a filter is 20,000 characters. + Optional. Only log entries that match + the filter are returned. An empty + filter matches all log entries in the + resources listed in `resource_names`. + Referencing a parent resource that is + not listed in `resource_names` will + cause the filter to return no results. + The maximum length of a filter is 20,000 + characters. This corresponds to the ``filter`` field on the ``request`` instance; if ``request`` is provided, this should not be set. order_by (:class:`str`): - Optional. How the results should be sorted. Presently, - the only permitted values are ``"timestamp asc"`` - (default) and ``"timestamp desc"``. The first option - returns entries in order of increasing values of - ``LogEntry.timestamp`` (oldest first), and the second - option returns entries in order of decreasing timestamps - (newest first). Entries with equal timestamps are - returned in order of their ``insert_id`` values. + Optional. How the results should be + sorted. Presently, the only permitted + values are `"timestamp asc"` (default) + and `"timestamp desc"`. The first option + returns entries in order of increasing + values of `LogEntry.timestamp` (oldest + first), and the second option returns + entries in order of decreasing + timestamps (newest first). Entries with + equal timestamps are returned in order + of their `insert_id` values. This corresponds to the ``order_by`` field on the ``request`` instance; if ``request`` is provided, this @@ -653,10 +689,11 @@ async def sample_list_log_entries(): Returns: google.cloud.logging_v2.services.logging_service_v2.pagers.ListLogEntriesAsyncPager: - Result returned from ListLogEntries. - - Iterating over this object will yield results and - resolve additional pages automatically. + Result returned from + `ListLogEntries`. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -846,12 +883,13 @@ async def sample_list_logs(): request (Optional[Union[google.cloud.logging_v2.types.ListLogsRequest, dict]]): The request object. The parameters to ListLogs. parent (:class:`str`): - Required. The resource name to list logs for: - - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + Required. The resource name to list + logs for: + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -979,7 +1017,7 @@ def request_generator(): Args: requests (AsyncIterator[`google.cloud.logging_v2.types.TailLogEntriesRequest`]): - The request object AsyncIterator. The parameters to ``TailLogEntries``. + The request object AsyncIterator. The parameters to `TailLogEntries`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -990,7 +1028,9 @@ def request_generator(): Returns: AsyncIterable[google.cloud.logging_v2.types.TailLogEntriesResponse]: - Result returned from TailLogEntries. + Result returned from + `TailLogEntries`. + """ # Wrap the RPC method; this adds retry and timeout information, diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py index a2d4b1a336..3eddc1f95a 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py @@ -605,11 +605,12 @@ def delete_log(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes all the log entries in a log for the \_Default Log - Bucket. The log reappears if it receives new entries. Log - entries written shortly before the delete operation might not be - deleted. Entries received after the delete operation with a - timestamp before the operation will be deleted. + r"""Deletes all the log entries in a log for the _Default + Log Bucket. The log reappears if it receives new + entries. Log entries written shortly before the delete + operation might not be deleted. Entries received after + the delete operation with a timestamp before the + operation will be deleted. .. code-block:: python @@ -638,18 +639,22 @@ def sample_delete_log(): request (Union[google.cloud.logging_v2.types.DeleteLogRequest, dict]): The request object. The parameters to DeleteLog. log_name (str): - Required. The resource name of the log to delete: - - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` - - ``[LOG_ID]`` must be URL-encoded. For example, - ``"projects/my-project-id/logs/syslog"``, - ``"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"``. - - For more information about log names, see + Required. The resource name of the + log to delete: + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` + + `[LOG_ID]` must be URL-encoded. For + example, + `"projects/my-project-id/logs/syslog"`, + `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + + For more information about log names, + see [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``log_name`` field @@ -756,87 +761,104 @@ def sample_write_log_entries(): request (Union[google.cloud.logging_v2.types.WriteLogEntriesRequest, dict]): The request object. The parameters to WriteLogEntries. log_name (str): - Optional. A default log resource name that is assigned - to all log entries in ``entries`` that do not specify a - value for ``log_name``: - - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` + Optional. A default log resource name + that is assigned to all log entries in + `entries` that do not specify a value + for `log_name`: - ``[LOG_ID]`` must be URL-encoded. For example: + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` - :: + `[LOG_ID]` must be URL-encoded. For + example: "projects/my-project-id/logs/syslog" - "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - The permission ``logging.logEntries.create`` is needed - on each project, organization, billing account, or - folder that is receiving new log entries, whether the - resource is specified in ``logName`` or in an individual - log entry. + The permission + `logging.logEntries.create` is needed on + each project, organization, billing + account, or folder that is receiving new + log entries, whether the resource is + specified in `logName` or in an + individual log entry. This corresponds to the ``log_name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. resource (google.api.monitored_resource_pb2.MonitoredResource): - Optional. A default monitored resource object that is - assigned to all log entries in ``entries`` that do not - specify a value for ``resource``. Example: - - :: + Optional. A default monitored + resource object that is assigned to all + log entries in `entries` that do not + specify a value for `resource`. Example: { "type": "gce_instance", "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + "zone": "us-central1-a", + "instance_id": "00000000000000000000" }} - See [LogEntry][google.logging.v2.LogEntry]. + See + [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. labels (MutableMapping[str, str]): - Optional. Default labels that are added to the - ``labels`` field of all log entries in ``entries``. If a - log entry already has a label with the same key as a - label in this parameter, then the log entry's label is - not changed. See [LogEntry][google.logging.v2.LogEntry]. + Optional. Default labels that are + added to the `labels` field of all log + entries in `entries`. If a log entry + already has a label with the same key as + a label in this parameter, then the log + entry's label is not changed. See + [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``labels`` field on the ``request`` instance; if ``request`` is provided, this should not be set. entries (MutableSequence[google.cloud.logging_v2.types.LogEntry]): - Required. The log entries to send to Logging. The order - of log entries in this list does not matter. Values - supplied in this method's ``log_name``, ``resource``, - and ``labels`` fields are copied into those log entries - in this list that do not include values for their - corresponding fields. For more information, see the - [LogEntry][google.logging.v2.LogEntry] type. - - If the ``timestamp`` or ``insert_id`` fields are missing - in log entries, then this method supplies the current - time or a unique identifier, respectively. The supplied - values are chosen so that, among the log entries that - did not supply their own values, the entries earlier in - the list will sort before the entries later in the list. - See the ``entries.list`` method. - - Log entries with timestamps that are more than the `logs - retention - period `__ in - the past or more than 24 hours in the future will not be - available when calling ``entries.list``. However, those - log entries can still be `exported with - LogSinks `__. - - To improve throughput and to avoid exceeding the `quota - limit `__ for - calls to ``entries.write``, you should try to include - several log entries in this list, rather than calling - this method for each individual log entry. + Required. The log entries to send to + Logging. The order of log entries in + this list does not matter. Values + supplied in this method's `log_name`, + `resource`, and `labels` fields are + copied into those log entries in this + list that do not include values for + their corresponding fields. For more + information, see the + [LogEntry][google.logging.v2.LogEntry] + type. + + If the `timestamp` or `insert_id` fields + are missing in log entries, then this + method supplies the current time or a + unique identifier, respectively. The + supplied values are chosen so that, + among the log entries that did not + supply their own values, the entries + earlier in the list will sort before the + entries later in the list. See the + `entries.list` method. + + Log entries with timestamps that are + more than the [logs retention + period](https://cloud.google.com/logging/quotas) + in the past or more than 24 hours in the + future will not be available when + calling `entries.list`. However, those + log entries can still be [exported with + LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + + To improve throughput and to avoid + exceeding the [quota + limit](https://cloud.google.com/logging/quotas) + for calls to `entries.write`, you should + try to include several log entries in + this list, rather than calling this + method for each individual log entry. This corresponds to the ``entries`` field on the ``request`` instance; if ``request`` is provided, this @@ -905,10 +927,11 @@ def list_log_entries(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListLogEntriesPager: - r"""Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. - For ways to export log entries, see `Exporting - Logs `__. + r"""Lists log entries. Use this method to retrieve log + entries that originated from a + project/folder/organization/billing account. For ways + to export log entries, see [Exporting + Logs](https://cloud.google.com/logging/docs/export). .. code-block:: python @@ -939,50 +962,63 @@ def sample_list_log_entries(): Args: request (Union[google.cloud.logging_v2.types.ListLogEntriesRequest, dict]): - The request object. The parameters to ``ListLogEntries``. + The request object. The parameters to `ListLogEntries`. resource_names (MutableSequence[str]): - Required. Names of one or more parent resources from - which to retrieve log entries: + Required. Names of one or more parent + resources from which to retrieve log + entries: - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` May alternatively be one or more views: - - ``projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` + * + `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - Projects listed in the ``project_ids`` field are added - to this list. A maximum of 100 resources may be - specified in a single request. + Projects listed in the `project_ids` + field are added to this list. A maximum + of 100 resources may be specified in a + single request. This corresponds to the ``resource_names`` field on the ``request`` instance; if ``request`` is provided, this should not be set. filter (str): - Optional. Only log entries that match the filter are - returned. An empty filter matches all log entries in the - resources listed in ``resource_names``. Referencing a - parent resource that is not listed in ``resource_names`` - will cause the filter to return no results. The maximum - length of a filter is 20,000 characters. + Optional. Only log entries that match + the filter are returned. An empty + filter matches all log entries in the + resources listed in `resource_names`. + Referencing a parent resource that is + not listed in `resource_names` will + cause the filter to return no results. + The maximum length of a filter is 20,000 + characters. This corresponds to the ``filter`` field on the ``request`` instance; if ``request`` is provided, this should not be set. order_by (str): - Optional. How the results should be sorted. Presently, - the only permitted values are ``"timestamp asc"`` - (default) and ``"timestamp desc"``. The first option - returns entries in order of increasing values of - ``LogEntry.timestamp`` (oldest first), and the second - option returns entries in order of decreasing timestamps - (newest first). Entries with equal timestamps are - returned in order of their ``insert_id`` values. + Optional. How the results should be + sorted. Presently, the only permitted + values are `"timestamp asc"` (default) + and `"timestamp desc"`. The first option + returns entries in order of increasing + values of `LogEntry.timestamp` (oldest + first), and the second option returns + entries in order of decreasing + timestamps (newest first). Entries with + equal timestamps are returned in order + of their `insert_id` values. This corresponds to the ``order_by`` field on the ``request`` instance; if ``request`` is provided, this @@ -997,10 +1033,11 @@ def sample_list_log_entries(): Returns: google.cloud.logging_v2.services.logging_service_v2.pagers.ListLogEntriesPager: - Result returned from ListLogEntries. - - Iterating over this object will yield results and - resolve additional pages automatically. + Result returned from + `ListLogEntries`. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1189,12 +1226,13 @@ def sample_list_logs(): request (Union[google.cloud.logging_v2.types.ListLogsRequest, dict]): The request object. The parameters to ListLogs. parent (str): - Required. The resource name to list logs for: - - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + Required. The resource name to list + logs for: + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1321,7 +1359,7 @@ def request_generator(): Args: requests (Iterator[google.cloud.logging_v2.types.TailLogEntriesRequest]): - The request object iterator. The parameters to ``TailLogEntries``. + The request object iterator. The parameters to `TailLogEntries`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1332,7 +1370,9 @@ def request_generator(): Returns: Iterable[google.cloud.logging_v2.types.TailLogEntriesResponse]: - Result returned from TailLogEntries. + Result returned from + `TailLogEntries`. + """ # Wrap the RPC method; this adds retry and timeout information, diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py index 8edc617027..fc24294257 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py @@ -317,11 +317,12 @@ def delete_log(self) -> Callable[ empty_pb2.Empty]: r"""Return a callable for the delete log method over gRPC. - Deletes all the log entries in a log for the \_Default Log - Bucket. The log reappears if it receives new entries. Log - entries written shortly before the delete operation might not be - deleted. Entries received after the delete operation with a - timestamp before the operation will be deleted. + Deletes all the log entries in a log for the _Default + Log Bucket. The log reappears if it receives new + entries. Log entries written shortly before the delete + operation might not be deleted. Entries received after + the delete operation with a timestamp before the + operation will be deleted. Returns: Callable[[~.DeleteLogRequest], @@ -379,10 +380,11 @@ def list_log_entries(self) -> Callable[ logging.ListLogEntriesResponse]: r"""Return a callable for the list log entries method over gRPC. - Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. - For ways to export log entries, see `Exporting - Logs `__. + Lists log entries. Use this method to retrieve log + entries that originated from a + project/folder/organization/billing account. For ways + to export log entries, see [Exporting + Logs](https://cloud.google.com/logging/docs/export). Returns: Callable[[~.ListLogEntriesRequest], diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py index 92aa1d5256..2171a045c7 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py @@ -323,11 +323,12 @@ def delete_log(self) -> Callable[ Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete log method over gRPC. - Deletes all the log entries in a log for the \_Default Log - Bucket. The log reappears if it receives new entries. Log - entries written shortly before the delete operation might not be - deleted. Entries received after the delete operation with a - timestamp before the operation will be deleted. + Deletes all the log entries in a log for the _Default + Log Bucket. The log reappears if it receives new + entries. Log entries written shortly before the delete + operation might not be deleted. Entries received after + the delete operation with a timestamp before the + operation will be deleted. Returns: Callable[[~.DeleteLogRequest], @@ -385,10 +386,11 @@ def list_log_entries(self) -> Callable[ Awaitable[logging.ListLogEntriesResponse]]: r"""Return a callable for the list log entries method over gRPC. - Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. - For ways to export log entries, see `Exporting - Logs `__. + Lists log entries. Use this method to retrieve log + entries that originated from a + project/folder/organization/billing account. For ways + to export log entries, see [Exporting + Logs](https://cloud.google.com/logging/docs/export). Returns: Callable[[~.ListLogEntriesRequest], diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py index ad659243d7..71492f6c8d 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py @@ -292,11 +292,8 @@ async def sample_list_log_metrics(): request (Optional[Union[google.cloud.logging_v2.types.ListLogMetricsRequest, dict]]): The request object. The parameters to ListLogMetrics. parent (:class:`str`): - Required. The name of the project containing the - metrics: - - :: - + Required. The name of the project + containing the metrics: "projects/[PROJECT_ID]" This corresponds to the ``parent`` field @@ -415,11 +412,9 @@ async def sample_get_log_metric(): request (Optional[Union[google.cloud.logging_v2.types.GetLogMetricRequest, dict]]): The request object. The parameters to GetLogMetric. metric_name (:class:`str`): - Required. The resource name of the desired metric: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + desired metric: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -539,14 +534,12 @@ async def sample_create_log_metric(): request (Optional[Union[google.cloud.logging_v2.types.CreateLogMetricRequest, dict]]): The request object. The parameters to CreateLogMetric. parent (:class:`str`): - Required. The resource name of the project in which to - create the metric: - - :: - + Required. The resource name of the + project in which to create the metric: "projects/[PROJECT_ID]" - The new metric must be provided in the request. + The new metric must be provided in the + request. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -676,16 +669,15 @@ async def sample_update_log_metric(): request (Optional[Union[google.cloud.logging_v2.types.UpdateLogMetricRequest, dict]]): The request object. The parameters to UpdateLogMetric. metric_name (:class:`str`): - Required. The resource name of the metric to update: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + metric to update: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - The updated metric must be provided in the request and - it's ``name`` field must be the same as ``[METRIC_ID]`` - If the metric does not exist in ``[PROJECT_ID]``, then a - new metric is created. + The updated metric must be provided in + the request and it's `name` field must + be the same as `[METRIC_ID]` If the + metric does not exist in `[PROJECT_ID]`, + then a new metric is created. This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -803,11 +795,9 @@ async def sample_delete_log_metric(): request (Optional[Union[google.cloud.logging_v2.types.DeleteLogMetricRequest, dict]]): The request object. The parameters to DeleteLogMetric. metric_name (:class:`str`): - Required. The resource name of the metric to delete: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + metric to delete: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py index 6cf913c0db..a16c5b8f0d 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py @@ -639,11 +639,8 @@ def sample_list_log_metrics(): request (Union[google.cloud.logging_v2.types.ListLogMetricsRequest, dict]): The request object. The parameters to ListLogMetrics. parent (str): - Required. The name of the project containing the - metrics: - - :: - + Required. The name of the project + containing the metrics: "projects/[PROJECT_ID]" This corresponds to the ``parent`` field @@ -761,11 +758,9 @@ def sample_get_log_metric(): request (Union[google.cloud.logging_v2.types.GetLogMetricRequest, dict]): The request object. The parameters to GetLogMetric. metric_name (str): - Required. The resource name of the desired metric: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + desired metric: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -884,14 +879,12 @@ def sample_create_log_metric(): request (Union[google.cloud.logging_v2.types.CreateLogMetricRequest, dict]): The request object. The parameters to CreateLogMetric. parent (str): - Required. The resource name of the project in which to - create the metric: - - :: - + Required. The resource name of the + project in which to create the metric: "projects/[PROJECT_ID]" - The new metric must be provided in the request. + The new metric must be provided in the + request. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1020,16 +1013,15 @@ def sample_update_log_metric(): request (Union[google.cloud.logging_v2.types.UpdateLogMetricRequest, dict]): The request object. The parameters to UpdateLogMetric. metric_name (str): - Required. The resource name of the metric to update: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + metric to update: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - The updated metric must be provided in the request and - it's ``name`` field must be the same as ``[METRIC_ID]`` - If the metric does not exist in ``[PROJECT_ID]``, then a - new metric is created. + The updated metric must be provided in + the request and it's `name` field must + be the same as `[METRIC_ID]` If the + metric does not exist in `[PROJECT_ID]`, + then a new metric is created. This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1146,11 +1138,9 @@ def sample_delete_log_metric(): request (Union[google.cloud.logging_v2.types.DeleteLogMetricRequest, dict]): The request object. The parameters to DeleteLogMetric. metric_name (str): - Required. The resource name of the metric to delete: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + metric to delete: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/types/log_entry.py b/tests/integration/goldens/logging/google/cloud/logging_v2/types/log_entry.py index 695393863f..326c5a4aa5 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/types/log_entry.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/types/log_entry.py @@ -50,35 +50,35 @@ class LogEntry(proto.Message): Attributes: log_name (str): - Required. The resource name of the log to which this log - entry belongs: - - :: - + Required. The resource name of the log to + which this log entry belongs: "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" - - A project number may be used in place of PROJECT_ID. The - project number is translated to its corresponding PROJECT_ID - internally and the ``log_name`` field will contain - PROJECT_ID in queries and exports. - - ``[LOG_ID]`` must be URL-encoded within ``log_name``. - Example: - ``"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"``. - - ``[LOG_ID]`` must be less than 512 characters long and can - only include the following characters: upper and lower case - alphanumeric characters, forward-slash, underscore, hyphen, - and period. - - For backward compatibility, if ``log_name`` begins with a - forward-slash, such as ``/projects/...``, then the log entry - is ingested as usual, but the forward-slash is removed. - Listing the log entry will not show the leading slash and - filtering for a log name with a leading slash will never + "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" + + A project number may be used in place of + PROJECT_ID. The project number is translated to + its corresponding PROJECT_ID internally and the + `log_name` field will contain PROJECT_ID in + queries and exports. + + `[LOG_ID]` must be URL-encoded within + `log_name`. Example: + + `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + + `[LOG_ID]` must be less than 512 characters long + and can only include the following characters: + upper and lower case alphanumeric characters, + forward-slash, underscore, hyphen, and period. + + For backward compatibility, if `log_name` begins + with a forward-slash, such as `/projects/...`, + then the log entry is ingested as usual, but the + forward-slash is removed. Listing the log entry + will not show the leading slash and filtering + for a log name with a leading slash will never return any results. resource (google.api.monitored_resource_pb2.MonitoredResource): Required. The monitored resource that @@ -111,123 +111,137 @@ class LogEntry(proto.Message): This field is a member of `oneof`_ ``payload``. timestamp (google.protobuf.timestamp_pb2.Timestamp): - Optional. The time the event described by the log entry - occurred. This time is used to compute the log entry's age - and to enforce the logs retention period. If this field is - omitted in a new log entry, then Logging assigns it the - current time. Timestamps have nanosecond accuracy, but - trailing zeros in the fractional seconds might be omitted - when the timestamp is displayed. - - Incoming log entries must have timestamps that don't exceed - the `logs retention - period `__ - in the past, and that don't exceed 24 hours in the future. - Log entries outside those time boundaries aren't ingested by - Logging. + Optional. The time the event described by the + log entry occurred. This time is used to compute + the log entry's age and to enforce the logs + retention period. If this field is omitted in a + new log entry, then Logging assigns it the + current time. Timestamps have nanosecond + accuracy, but trailing zeros in the fractional + seconds might be omitted when the timestamp is + displayed. + + Incoming log entries must have timestamps that + don't exceed the [logs retention + period](https://cloud.google.com/logging/quotas#logs_retention_periods) + in the past, and that don't exceed 24 hours in + the future. Log entries outside those time + boundaries aren't ingested by Logging. receive_timestamp (google.protobuf.timestamp_pb2.Timestamp): Output only. The time the log entry was received by Logging. severity (google.logging.type.log_severity_pb2.LogSeverity): - Optional. The severity of the log entry. The default value - is ``LogSeverity.DEFAULT``. + Optional. The severity of the log entry. The + default value is `LogSeverity.DEFAULT`. insert_id (str): - Optional. A unique identifier for the log entry. If you - provide a value, then Logging considers other log entries in - the same project, with the same ``timestamp``, and with the - same ``insert_id`` to be duplicates which are removed in a - single query result. However, there are no guarantees of - de-duplication in the export of logs. - - If the ``insert_id`` is omitted when writing a log entry, - the Logging API assigns its own unique identifier in this - field. - - In queries, the ``insert_id`` is also used to order log - entries that have the same ``log_name`` and ``timestamp`` - values. + Optional. A unique identifier for the log + entry. If you provide a value, then Logging + considers other log entries in the same project, + with the same `timestamp`, and with the same + `insert_id` to be duplicates which are removed + in a single query result. However, there are no + guarantees of de-duplication in the export of + logs. + + If the `insert_id` is omitted when writing a log + entry, the Logging API assigns its own unique + identifier in this field. + + In queries, the `insert_id` is also used to + order log entries that have the same `log_name` + and `timestamp` values. http_request (google.logging.type.http_request_pb2.HttpRequest): Optional. Information about the HTTP request associated with this log entry, if applicable. labels (MutableMapping[str, str]): - Optional. A map of key, value pairs that provides additional - information about the log entry. The labels can be - user-defined or system-defined. - - User-defined labels are arbitrary key, value pairs that you - can use to classify logs. - - System-defined labels are defined by GCP services for - platform logs. They have two components - a service - namespace component and the attribute name. For example: - ``compute.googleapis.com/resource_name``. - - Cloud Logging truncates label keys that exceed 512 B and - label values that exceed 64 KB upon their associated log - entry being written. The truncation is indicated by an - ellipsis at the end of the character string. + Optional. A map of key, value pairs that + provides additional information about the log + entry. The labels can be user-defined or + system-defined. + + User-defined labels are arbitrary key, value + pairs that you can use to classify logs. + + System-defined labels are defined by GCP + services for platform logs. They have two + components - a service namespace component and + the attribute name. For example: + `compute.googleapis.com/resource_name`. + + Cloud Logging truncates label keys that exceed + 512 B and label values that exceed 64 KB upon + their associated log entry being written. The + truncation is indicated by an ellipsis at the + end of the character string. operation (google.cloud.logging_v2.types.LogEntryOperation): Optional. Information about an operation associated with the log entry, if applicable. trace (str): - Optional. The REST resource name of the trace being written - to `Cloud Trace `__ in - association with this log entry. For example, if your trace - data is stored in the Cloud project "my-trace-project" and - if the service that is creating the log entry receives a - trace header that includes the trace ID "12345", then the + Optional. The REST resource name of the trace + being written to [Cloud + Trace](https://cloud.google.com/trace) in + association with this log entry. For example, if + your trace data is stored in the Cloud project + "my-trace-project" and if the service that is + creating the log entry receives a trace header + that includes the trace ID "12345", then the service should use "projects/my-tracing-project/traces/12345". - The ``trace`` field provides the link between logs and - traces. By using this field, you can navigate from a log - entry to a trace. + The `trace` field provides the link between logs + and traces. By using this field, you can + navigate from a log entry to a trace. span_id (str): - Optional. The ID of the `Cloud - Trace `__ span associated - with the current operation in which the log is being - written. For example, if a span has the REST resource name - of + Optional. The ID of the [Cloud + Trace](https://cloud.google.com/trace) span + associated with the current operation in which + the log is being written. For example, if a span + has the REST resource name of "projects/some-project/traces/some-trace/spans/some-span-id", - then the ``span_id`` field is "some-span-id". + then the `span_id` field is "some-span-id". A - `Span `__ - represents a single operation within a trace. Whereas a - trace may involve multiple different microservices running - on multiple different machines, a span generally corresponds - to a single logical operation being performed in a single - instance of a microservice on one specific machine. Spans - are the nodes within the tree that is a trace. - - Applications that are `instrumented for - tracing `__ will - generally assign a new, unique span ID on each incoming - request. It is also common to create and record additional - spans corresponding to internal processing elements as well - as issuing requests to dependencies. - - The span ID is expected to be a 16-character, hexadecimal - encoding of an 8-byte array and should not be zero. It - should be unique within the trace and should, ideally, be - generated in a manner that is uniformly random. + [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) + represents a single operation within a trace. + Whereas a trace may involve multiple different + microservices running on multiple different + machines, a span generally corresponds to a + single logical operation being performed in a + single instance of a microservice on one + specific machine. Spans are the nodes within the + tree that is a trace. + + Applications that are [instrumented for + tracing](https://cloud.google.com/trace/docs/setup) + will generally assign a new, unique span ID on + each incoming request. It is also common to + create and record additional spans corresponding + to internal processing elements as well as + issuing requests to dependencies. + + The span ID is expected to be a 16-character, + hexadecimal encoding of an 8-byte array and + should not be zero. It should be unique within + the trace and should, ideally, be generated in a + manner that is uniformly random. Example values: - - ``000000000000004a`` - - ``7a2190356c3fc94b`` - - ``0000f00300090021`` - - ``d39223e101960076`` + - `000000000000004a` + - `7a2190356c3fc94b` + - `0000f00300090021` + - `d39223e101960076` trace_sampled (bool): - Optional. The sampling decision of the trace associated with - the log entry. - - True means that the trace resource name in the ``trace`` - field was sampled for storage in a trace backend. False - means that the trace was not sampled for storage when this - log entry was written, or the sampling decision was unknown - at the time. A non-sampled ``trace`` value is still useful - as a request correlation identifier. The default is False. + Optional. The sampling decision of the trace + associated with the log entry. + True means that the trace resource name in the + `trace` field was sampled for storage in a trace + backend. False means that the trace was not + sampled for storage when this log entry was + written, or the sampling decision was unknown at + the time. A non-sampled `trace` value is still + useful as a request correlation identifier. The + default is False. source_location (google.cloud.logging_v2.types.LogEntrySourceLocation): Optional. Source code location information associated with the log entry, if any. @@ -331,10 +345,12 @@ class LogEntryOperation(proto.Message): Log entries with the same identifier are assumed to be part of the same operation. producer (str): - Optional. An arbitrary producer identifier. The combination - of ``id`` and ``producer`` must be globally unique. Examples - for ``producer``: ``"MyDivision.MyBigCompany.com"``, - ``"github.com/MyProject/MyApplication"``. + Optional. An arbitrary producer identifier. + The combination of `id` and `producer` must be + globally unique. Examples for `producer`: + + `"MyDivision.MyBigCompany.com"`, + `"github.com/MyProject/MyApplication"`. first (bool): Optional. Set this to True if this is the first log entry in the operation. @@ -374,13 +390,16 @@ class LogEntrySourceLocation(proto.Message): Optional. Line within the source file. 1-based; 0 indicates no line number available. function (str): - Optional. Human-readable name of the function or method - being invoked, with optional context such as the class or - package name. This information may be used in contexts such - as the logs viewer, where a file and line number are less - meaningful. The format can vary by language. For example: - ``qual.if.ied.Class.method`` (Java), ``dir/package.func`` - (Go), ``function`` (Python). + Optional. Human-readable name of the function + or method being invoked, with optional context + such as the class or package name. This + information may be used in contexts such as the + logs viewer, where a file and line number are + less meaningful. The format can vary by + language. For example: + + `qual.if.ied.Class.method` (Java), + `dir/package.func` (Go), `function` (Python). """ file: str = proto.Field( @@ -405,14 +424,16 @@ class LogSplit(proto.Message): Attributes: uid (str): - A globally unique identifier for all log entries in a - sequence of split log entries. All log entries with the same - \|LogSplit.uid\| are assumed to be part of the same sequence - of split log entries. + A globally unique identifier for all log + entries in a sequence of split log entries. All + log entries with the same |LogSplit.uid| are + assumed to be part of the same sequence of split + log entries. index (int): - The index of this LogEntry in the sequence of split log - entries. Log entries are given \|index\| values 0, 1, ..., - n-1 for a sequence of n log entries. + The index of this LogEntry in the sequence of + split log entries. Log entries are given |index| + values 0, 1, ..., n-1 for a sequence of n log + entries. total_splits (int): The total number of log entries that the original LogEntry was split into. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging.py b/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging.py index 5b1dd80ceb..7efc5cc6e9 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging.py @@ -49,16 +49,18 @@ class DeleteLogRequest(proto.Message): Attributes: log_name (str): - Required. The resource name of the log to delete: - - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` - - ``[LOG_ID]`` must be URL-encoded. For example, - ``"projects/my-project-id/logs/syslog"``, - ``"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"``. + Required. The resource name of the log to + delete: + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` + + `[LOG_ID]` must be URL-encoded. For example, + `"projects/my-project-id/logs/syslog"`, + `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. @@ -75,84 +77,94 @@ class WriteLogEntriesRequest(proto.Message): Attributes: log_name (str): - Optional. A default log resource name that is assigned to - all log entries in ``entries`` that do not specify a value - for ``log_name``: + Optional. A default log resource name that is + assigned to all log entries in `entries` that do + not specify a value for `log_name`: - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` - ``[LOG_ID]`` must be URL-encoded. For example: - - :: + `[LOG_ID]` must be URL-encoded. For example: "projects/my-project-id/logs/syslog" - "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - The permission ``logging.logEntries.create`` is needed on - each project, organization, billing account, or folder that - is receiving new log entries, whether the resource is - specified in ``logName`` or in an individual log entry. + The permission `logging.logEntries.create` is + needed on each project, organization, billing + account, or folder that is receiving new log + entries, whether the resource is specified in + `logName` or in an individual log entry. resource (google.api.monitored_resource_pb2.MonitoredResource): - Optional. A default monitored resource object that is - assigned to all log entries in ``entries`` that do not - specify a value for ``resource``. Example: - - :: + Optional. A default monitored resource object + that is assigned to all log entries in `entries` + that do not specify a value for `resource`. + Example: { "type": "gce_instance", "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + "zone": "us-central1-a", "instance_id": + "00000000000000000000" }} See [LogEntry][google.logging.v2.LogEntry]. labels (MutableMapping[str, str]): - Optional. Default labels that are added to the ``labels`` - field of all log entries in ``entries``. If a log entry - already has a label with the same key as a label in this - parameter, then the log entry's label is not changed. See + Optional. Default labels that are added to + the `labels` field of all log entries in + `entries`. If a log entry already has a label + with the same key as a label in this parameter, + then the log entry's label is not changed. See [LogEntry][google.logging.v2.LogEntry]. entries (MutableSequence[google.cloud.logging_v2.types.LogEntry]): - Required. The log entries to send to Logging. The order of - log entries in this list does not matter. Values supplied in - this method's ``log_name``, ``resource``, and ``labels`` - fields are copied into those log entries in this list that - do not include values for their corresponding fields. For - more information, see the + Required. The log entries to send to Logging. + The order of log entries in this list does not + matter. Values supplied in this method's + `log_name`, `resource`, and `labels` fields are + copied into those log entries in this list that + do not include values for their corresponding + fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. - If the ``timestamp`` or ``insert_id`` fields are missing in - log entries, then this method supplies the current time or a - unique identifier, respectively. The supplied values are - chosen so that, among the log entries that did not supply - their own values, the entries earlier in the list will sort - before the entries later in the list. See the - ``entries.list`` method. - - Log entries with timestamps that are more than the `logs - retention - period `__ in the - past or more than 24 hours in the future will not be - available when calling ``entries.list``. However, those log - entries can still be `exported with - LogSinks `__. - - To improve throughput and to avoid exceeding the `quota - limit `__ for calls - to ``entries.write``, you should try to include several log - entries in this list, rather than calling this method for - each individual log entry. + If the `timestamp` or `insert_id` fields are + missing in log entries, then this method + supplies the current time or a unique + identifier, respectively. The supplied values + are chosen so that, among the log entries that + did not supply their own values, the entries + earlier in the list will sort before the entries + later in the list. See the `entries.list` + method. + + Log entries with timestamps that are more than + the [logs retention + period](https://cloud.google.com/logging/quotas) + in the past or more than 24 hours in the future + will not be available when calling + `entries.list`. However, those log entries can + still be [exported with + LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + + To improve throughput and to avoid exceeding the + [quota + limit](https://cloud.google.com/logging/quotas) + for calls to `entries.write`, you should try to + include several log entries in this list, rather + than calling this method for each individual log + entry. partial_success (bool): - Optional. Whether a batch's valid entries should be written - even if some other entry failed due to a permanent error - such as INVALID_ARGUMENT or PERMISSION_DENIED. If any entry - failed, then the response status is the response status of - one of the failed entries. The response will include error - details in ``WriteLogEntriesPartialErrors.log_entry_errors`` - keyed by the entries' zero-based index in the ``entries``. - Failed requests for which no entries are written will not - include per-entry errors. + Optional. Whether a batch's valid entries + should be written even if some other entry + failed due to a permanent error such as + INVALID_ARGUMENT or PERMISSION_DENIED. If any + entry failed, then the response status is the + response status of one of the failed entries. + The response will include error details in + `WriteLogEntriesPartialErrors.log_entry_errors` + keyed by the entries' zero-based index in the + `entries`. Failed requests for which no entries + are written will not include per-entry errors. dry_run (bool): Optional. If true, the request should expect normal response, but the entries won't be @@ -200,13 +212,14 @@ class WriteLogEntriesPartialErrors(proto.Message): Attributes: log_entry_errors (MutableMapping[int, google.rpc.status_pb2.Status]): - When ``WriteLogEntriesRequest.partial_success`` is true, - records the error status for entries that were not written - due to a permanent error, keyed by the entry's zero-based - index in ``WriteLogEntriesRequest.entries``. - - Failed requests for which no entries are written will not - include per-entry errors. + When `WriteLogEntriesRequest.partial_success` + is true, records the error status for entries + that were not written due to a permanent error, + keyed by the entry's zero-based index in + `WriteLogEntriesRequest.entries`. + + Failed requests for which no entries are written + will not include per-entry errors. """ log_entry_errors: MutableMapping[int, status_pb2.Status] = proto.MapField( @@ -218,56 +231,65 @@ class WriteLogEntriesPartialErrors(proto.Message): class ListLogEntriesRequest(proto.Message): - r"""The parameters to ``ListLogEntries``. + r"""The parameters to `ListLogEntries`. Attributes: resource_names (MutableSequence[str]): - Required. Names of one or more parent resources from which - to retrieve log entries: + Required. Names of one or more parent + resources from which to retrieve log entries: - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` May alternatively be one or more views: - - ``projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - Projects listed in the ``project_ids`` field are added to - this list. A maximum of 100 resources may be specified in a - single request. + * + `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + + Projects listed in the `project_ids` field are + added to this list. A maximum of 100 resources + may be specified in a single request. filter (str): - Optional. Only log entries that match the filter are - returned. An empty filter matches all log entries in the - resources listed in ``resource_names``. Referencing a parent - resource that is not listed in ``resource_names`` will cause - the filter to return no results. The maximum length of a - filter is 20,000 characters. + Optional. Only log entries that match the + filter are returned. An empty filter matches + all log entries in the resources listed in + `resource_names`. Referencing a parent resource + that is not listed in `resource_names` will + cause the filter to return no results. The + maximum length of a filter is 20,000 characters. order_by (str): - Optional. How the results should be sorted. Presently, the - only permitted values are ``"timestamp asc"`` (default) and - ``"timestamp desc"``. The first option returns entries in - order of increasing values of ``LogEntry.timestamp`` (oldest - first), and the second option returns entries in order of - decreasing timestamps (newest first). Entries with equal - timestamps are returned in order of their ``insert_id`` - values. + Optional. How the results should be sorted. + Presently, the only permitted values are + `"timestamp asc"` (default) and `"timestamp + desc"`. The first option returns entries in + order of increasing values of + `LogEntry.timestamp` (oldest first), and the + second option returns entries in order of + decreasing timestamps (newest first). Entries + with equal timestamps are returned in order of + their `insert_id` values. page_size (int): - Optional. The maximum number of results to return from this - request. Default is 50. If the value is negative or exceeds - 1000, the request is rejected. The presence of - ``next_page_token`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Default is 50. If the + value is negative or exceeds 1000, the request + is rejected. The presence of `next_page_token` + in the response indicates that more results + might be available. page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``page_token`` must be the value of ``next_page_token`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `page_token` must be the value of + `next_page_token` from the previous response. + The values of other method parameters should be + identical to those in the previous call. """ resource_names: MutableSequence[str] = proto.RepeatedField( @@ -293,28 +315,31 @@ class ListLogEntriesRequest(proto.Message): class ListLogEntriesResponse(proto.Message): - r"""Result returned from ``ListLogEntries``. + r"""Result returned from `ListLogEntries`. Attributes: entries (MutableSequence[google.cloud.logging_v2.types.LogEntry]): - A list of log entries. If ``entries`` is empty, - ``nextPageToken`` may still be returned, indicating that - more entries may exist. See ``nextPageToken`` for more - information. + A list of log entries. If `entries` is + empty, `nextPageToken` may still be returned, + indicating that more entries may exist. See + `nextPageToken` for more information. next_page_token (str): - If there might be more results than those appearing in this - response, then ``nextPageToken`` is included. To get the - next set of results, call this method again using the value - of ``nextPageToken`` as ``pageToken``. - - If a value for ``next_page_token`` appears and the - ``entries`` field is empty, it means that the search found - no log entries so far but it did not have time to search all - the possible log entries. Retry the method with this value - for ``page_token`` to continue the search. Alternatively, - consider speeding up the search by changing your filter to - specify a single log name or resource type, or to narrow the - time range of the search. + If there might be more results than those + appearing in this response, then `nextPageToken` + is included. To get the next set of results, + call this method again using the value of + `nextPageToken` as `pageToken`. + + If a value for `next_page_token` appears and the + `entries` field is empty, it means that the + search found no log entries so far but it did + not have time to search all the possible log + entries. Retry the method with this value for + `page_token` to continue the search. + Alternatively, consider speeding up the search + by changing your filter to specify a single log + name or resource type, or to narrow the time + range of the search. """ @property @@ -337,16 +362,18 @@ class ListMonitoredResourceDescriptorsRequest(proto.Message): Attributes: page_size (int): - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Non-positive values + are ignored. The presence of `nextPageToken` in + the response indicates that more results might + be available. page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. """ page_size: int = proto.Field( @@ -366,10 +393,11 @@ class ListMonitoredResourceDescriptorsResponse(proto.Message): resource_descriptors (MutableSequence[google.api.monitored_resource_pb2.MonitoredResourceDescriptor]): A list of resource descriptors. next_page_token (str): - If there might be more results than those appearing in this - response, then ``nextPageToken`` is included. To get the - next set of results, call this method again using the value - of ``nextPageToken`` as ``pageToken``. + If there might be more results than those + appearing in this response, then `nextPageToken` + is included. To get the next set of results, + call this method again using the value of + `nextPageToken` as `pageToken`. """ @property @@ -394,38 +422,44 @@ class ListLogsRequest(proto.Message): parent (str): Required. The resource name to list logs for: - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` resource_names (MutableSequence[str]): - Optional. List of resource names to list logs for: - - - ``projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` + Optional. List of resource names to list logs + for: + * + `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` To support legacy queries, it could also be: - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` - The resource name in the ``parent`` field is added to this - list. + The resource name in the `parent` field is added + to this list. page_size (int): - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Non-positive values + are ignored. The presence of `nextPageToken` in + the response indicates that more results might + be available. page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. """ parent: str = proto.Field( @@ -452,13 +486,14 @@ class ListLogsResponse(proto.Message): Attributes: log_names (MutableSequence[str]): A list of log names. For example, - ``"projects/my-project/logs/syslog"`` or - ``"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"``. + `"projects/my-project/logs/syslog"` or + `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. next_page_token (str): - If there might be more results than those appearing in this - response, then ``nextPageToken`` is included. To get the - next set of results, call this method again using the value - of ``nextPageToken`` as ``pageToken``. + If there might be more results than those + appearing in this response, then `nextPageToken` + is included. To get the next set of results, + call this method again using the value of + `nextPageToken` as `pageToken`. """ @property @@ -476,31 +511,35 @@ def raw_page(self): class TailLogEntriesRequest(proto.Message): - r"""The parameters to ``TailLogEntries``. + r"""The parameters to `TailLogEntries`. Attributes: resource_names (MutableSequence[str]): - Required. Name of a parent resource from which to retrieve - log entries: - - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + Required. Name of a parent resource from + which to retrieve log entries: + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` May alternatively be one or more views: - - ``projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` + * + `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` filter (str): - Optional. Only log entries that match the filter are - returned. An empty filter matches all log entries in the - resources listed in ``resource_names``. Referencing a parent - resource that is not listed in ``resource_names`` will cause - the filter to return no results. The maximum length of a - filter is 20,000 characters. + Optional. Only log entries that match the + filter are returned. An empty filter matches + all log entries in the resources listed in + `resource_names`. Referencing a parent resource + that is not listed in `resource_names` will + cause the filter to return no results. The + maximum length of a filter is 20,000 characters. buffer_window (google.protobuf.duration_pb2.Duration): Optional. The amount of time to buffer log entries at the server before being returned to @@ -526,14 +565,14 @@ class TailLogEntriesRequest(proto.Message): class TailLogEntriesResponse(proto.Message): - r"""Result returned from ``TailLogEntries``. + r"""Result returned from `TailLogEntries`. Attributes: entries (MutableSequence[google.cloud.logging_v2.types.LogEntry]): - A list of log entries. Each response in the stream will - order entries with increasing values of - ``LogEntry.timestamp``. Ordering is not guaranteed between - separate responses. + A list of log entries. Each response in the + stream will order entries with increasing values + of `LogEntry.timestamp`. Ordering is not + guaranteed between separate responses. suppression_info (MutableSequence[google.cloud.logging_v2.types.TailLogEntriesResponse.SuppressionInfo]): If entries that otherwise would have been included in the session were not sent back to @@ -553,8 +592,8 @@ class SuppressionInfo(proto.Message): The reason that entries were omitted from the session. suppressed_count (int): - A lower bound on the count of entries omitted due to - ``reason``. + A lower bound on the count of entries omitted + due to `reason`. """ class Reason(proto.Enum): r"""An indicator of why entries were omitted. @@ -563,10 +602,11 @@ class Reason(proto.Enum): REASON_UNSPECIFIED (0): Unexpected default. RATE_LIMIT (1): - Indicates suppression occurred due to relevant entries being - received in excess of rate limits. For quotas and limits, - see `Logging API quotas and - limits `__. + Indicates suppression occurred due to + relevant entries being received in excess of + rate limits. For quotas and limits, see [Logging + API quotas and + limits](https://cloud.google.com/logging/quotas#api-limits). NOT_CONSUMED (2): Indicates suppression occurred due to the client not consuming responses quickly enough. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging_config.py b/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging_config.py index 292f690774..caadea0bea 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging_config.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging_config.py @@ -172,12 +172,13 @@ class IndexConfig(proto.Message): field_path (str): Required. The LogEntry field path to index. - Note that some paths are automatically indexed, and other - paths are not eligible for indexing. See `indexing - documentation `__ + Note that some paths are automatically indexed, + and other paths are not eligible for indexing. + See [indexing documentation]( + https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) for details. - For example: ``jsonPayload.request.status`` + For example: `jsonPayload.request.status` type_ (google.cloud.logging_v2.types.IndexType): Required. The type of data in this index. create_time (google.protobuf.timestamp_pb2.Timestamp): @@ -212,16 +213,17 @@ class LogBucket(proto.Message): For example: - ``projects/my-project/locations/global/buckets/my-bucket`` + `projects/my-project/locations/global/buckets/my-bucket` - For a list of supported locations, see `Supported - Regions `__ + For a list of supported locations, see + [Supported + Regions](https://cloud.google.com/logging/docs/region-support) - For the location of ``global`` it is unspecified where log - entries are actually stored. + For the location of `global` it is unspecified + where log entries are actually stored. - After a bucket has been created, the location cannot be - changed. + After a bucket has been created, the location + cannot be changed. description (str): Describes this bucket. create_time (google.protobuf.timestamp_pb2.Timestamp): @@ -252,15 +254,17 @@ class LogBucket(proto.Message): Once enabled, log analytics features cannot be disabled. restricted_fields (MutableSequence[str]): - Log entry field paths that are denied access in this bucket. - - The following fields and their children are eligible: - ``textPayload``, ``jsonPayload``, ``protoPayload``, - ``httpRequest``, ``labels``, ``sourceLocation``. - - Restricting a repeated field will restrict all values. - Adding a parent will block all child fields. (e.g. - ``foo.bar`` will block ``foo.bar.baz``) + Log entry field paths that are denied access + in this bucket. + The following fields and their children are + eligible: `textPayload`, `jsonPayload`, + `protoPayload`, `httpRequest`, `labels`, + `sourceLocation`. + + Restricting a repeated field will restrict all + values. Adding a parent will block all child + fields. (e.g. `foo.bar` will block + `foo.bar.baz`) index_configs (MutableSequence[google.cloud.logging_v2.types.IndexConfig]): A list of indexed fields and related configuration data. @@ -334,7 +338,7 @@ class LogView(proto.Message): For example: - ``projects/my-project/locations/global/buckets/my-bucket/views/my-view`` + `projects/my-project/locations/global/buckets/my-bucket/views/my-view` description (str): Describes this view. create_time (google.protobuf.timestamp_pb2.Timestamp): @@ -344,20 +348,22 @@ class LogView(proto.Message): Output only. The last update timestamp of the view. filter (str): - Filter that restricts which log entries in a bucket are - visible in this view. + Filter that restricts which log entries in a + bucket are visible in this view. - Filters are restricted to be a logical AND of ==/!= of any - of the following: + Filters are restricted to be a logical AND of + ==/!= of any of the following: - - originating project/folder/organization/billing account. - - resource type - - log id + - originating + project/folder/organization/billing account. + - resource type + - log id For example: - SOURCE("projects/myproject") AND resource.type = - "gce_instance" AND LOG_ID("stdout") + SOURCE("projects/myproject") AND resource.type + = "gce_instance" + AND LOG_ID("stdout") """ name: str = proto.Field( @@ -397,37 +403,38 @@ class LogSink(proto.Message): Attributes: name (str): - Required. The client-assigned sink identifier, unique within - the project. - - For example: ``"my-syslog-errors-to-pubsub"``. Sink - identifiers are limited to 100 characters and can include - only the following characters: upper and lower-case - alphanumeric characters, underscores, hyphens, and periods. - First character has to be alphanumeric. + Required. The client-assigned sink + identifier, unique within the project. + For example: `"my-syslog-errors-to-pubsub"`. + Sink identifiers are limited to 100 characters + and can include only the following characters: + upper and lower-case alphanumeric characters, + underscores, hyphens, and periods. First + character has to be alphanumeric. destination (str): Required. The export destination: - :: - - "storage.googleapis.com/[GCS_BUCKET]" - "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" + "storage.googleapis.com/[GCS_BUCKET]" + "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - The sink's ``writer_identity``, set when the sink is - created, must have permission to write to the destination or - else the log entries are not exported. For more information, - see `Exporting Logs with - Sinks `__. + The sink's `writer_identity`, set when the sink + is created, must have permission to write to the + destination or else the log entries are not + exported. For more information, see + [Exporting Logs with + Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). filter (str): - Optional. An `advanced logs - filter `__. - The only exported log entries are those that are in the - resource owning the sink and that match the filter. + Optional. An [advanced logs + filter](https://cloud.google.com/logging/docs/view/advanced-queries). + The only exported log entries are those that are + in the resource owning the sink and that match + the filter. For example: - ``logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR`` + `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" + AND severity>=ERROR` description (str): Optional. A description of this sink. @@ -437,55 +444,65 @@ class LogSink(proto.Message): Optional. If set to true, then this sink is disabled and it does not export any log entries. exclusions (MutableSequence[google.cloud.logging_v2.types.LogExclusion]): - Optional. Log entries that match any of these exclusion - filters will not be exported. + Optional. Log entries that match any of these + exclusion filters will not be exported. - If a log entry is matched by both ``filter`` and one of - ``exclusion_filters`` it will not be exported. + If a log entry is matched by both `filter` and + one of `exclusion_filters` it will not be + exported. output_version_format (google.cloud.logging_v2.types.LogSink.VersionFormat): Deprecated. This field is unused. writer_identity (str): - Output only. An IAM identity—a service account or - group—under which Cloud Logging writes the exported log - entries to the sink's destination. This field is either set - by specifying ``custom_writer_identity`` or set + Output only. An IAM identity—a service + account or group—under which Cloud Logging + writes the exported log entries to the sink's + destination. This field is either set by + specifying `custom_writer_identity` or set automatically by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] - based on the value of ``unique_writer_identity`` in those - methods. - - Until you grant this identity write-access to the - destination, log entry exports from this sink will fail. For - more information, see `Granting Access for a - Resource `__. - Consult the destination service's documentation to determine - the appropriate IAM roles to assign to the identity. - - Sinks that have a destination that is a log bucket in the - same project as the sink cannot have a writer_identity and - no additional permissions are required. + based on the value of `unique_writer_identity` + in those methods. + + Until you grant this identity write-access to + the destination, log entry exports from this + sink will fail. For more information, see + [Granting Access for a + Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + Consult the destination service's documentation + to determine the appropriate IAM roles to assign + to the identity. + + Sinks that have a destination that is a log + bucket in the same project as the sink cannot + have a writer_identity and no additional + permissions are required. include_children (bool): - Optional. This field applies only to sinks owned by - organizations and folders. If the field is false, the - default, only the logs owned by the sink's parent resource - are available for export. If the field is true, then log - entries from all the projects, folders, and billing accounts - contained in the sink's parent resource are also available - for export. Whether a particular log entry from the children - is exported depends on the sink's filter expression. - - For example, if this field is true, then the filter - ``resource.type=gce_instance`` would export all Compute - Engine VM instance log entries from all projects in the - sink's parent. - - To only export entries from certain child projects, filter - on the project part of the log name: - - logName:("projects/test-project1/" OR - "projects/test-project2/") AND resource.type=gce_instance + Optional. This field applies only to sinks + owned by organizations and folders. If the field + is false, the default, only the logs owned by + the sink's parent resource are available for + export. If the field is true, then log entries + from all the projects, folders, and billing + accounts contained in the sink's parent resource + are also available for export. Whether a + particular log entry from the children is + exported depends on the sink's filter + expression. + + For example, if this field is true, then the + filter `resource.type=gce_instance` would export + all Compute Engine VM instance log entries from + all projects in the sink's parent. + + To only export entries from certain child + projects, filter on the project part of the log + name: + + logName:("projects/test-project1/" OR + "projects/test-project2/") AND + resource.type=gce_instance bigquery_options (google.cloud.logging_v2.types.BigQueryOptions): Optional. Options that affect sinks exporting data to BigQuery. @@ -508,9 +525,9 @@ class VersionFormat(proto.Enum): An unspecified format version that will default to V2. V2 (1): - ``LogEntry`` version 2 format. + `LogEntry` version 2 format. V1 (2): - ``LogEntry`` version 1 format. + `LogEntry` version 1 format. """ VERSION_FORMAT_UNSPECIFIED = 0 V2 = 1 @@ -577,9 +594,10 @@ class BigQueryDataset(proto.Message): Attributes: dataset_id (str): - Output only. The full resource name of the BigQuery dataset. - The DATASET_ID will match the ID of the link, so the link - must match the naming restrictions of BigQuery datasets + Output only. The full resource name of the + BigQuery dataset. The DATASET_ID will match the + ID of the link, so the link must match the + naming restrictions of BigQuery datasets (alphanumeric characters and underscores only). The dataset will have a resource path of @@ -597,21 +615,20 @@ class Link(proto.Message): Attributes: name (str): - The resource name of the link. The name can have up to 100 - characters. A valid link id (at the end of the link name) - must only have alphanumeric characters and underscores - within it. + The resource name of the link. The name can + have up to 100 characters. A valid link id (at + the end of the link name) must only have + alphanumeric characters and underscores within + it. - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" For example: - \`projects/my-project/locations/global/buckets/my-bucket/links/my_link + `projects/my-project/locations/global/buckets/my-bucket/links/my_link description (str): Describes this link. @@ -662,25 +679,28 @@ class BigQueryOptions(proto.Message): Attributes: use_partitioned_tables (bool): - Optional. Whether to use `BigQuery's partition - tables `__. - By default, Cloud Logging creates dated tables based on the - log entries' timestamps, e.g. syslog_20170523. With - partitioned tables the date suffix is no longer present and - `special query - syntax `__ - has to be used instead. In both cases, tables are sharded - based on UTC timezone. + Optional. Whether to use [BigQuery's + partition + tables](https://cloud.google.com/bigquery/docs/partitioned-tables). + By default, Cloud Logging creates dated tables + based on the log entries' timestamps, e.g. + syslog_20170523. With partitioned tables the + date suffix is no longer present and [special + query + syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) + has to be used instead. In both cases, tables + are sharded based on UTC timezone. uses_timestamp_column_partitioning (bool): - Output only. True if new timestamp column based partitioning - is in use, false if legacy ingestion-time partitioning is in - use. - - All new sinks will have this field set true and will use - timestamp column based partitioning. If - use_partitioned_tables is false, this value has no meaning - and will be false. Legacy sinks using partitioned tables - will have this field set to false. + Output only. True if new timestamp column + based partitioning is in use, false if legacy + ingestion-time partitioning is in use. + + All new sinks will have this field set true and + will use timestamp column based partitioning. If + use_partitioned_tables is false, this value has + no meaning and will be false. Legacy sinks using + partitioned tables will have this field set to + false. """ use_partitioned_tables: bool = proto.Field( @@ -694,34 +714,33 @@ class BigQueryOptions(proto.Message): class ListBucketsRequest(proto.Message): - r"""The parameters to ``ListBuckets``. + r"""The parameters to `ListBuckets`. Attributes: parent (str): - Required. The parent resource whose buckets are to be - listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - - Note: The locations portion of the resource must be - specified, but supplying the character ``-`` in place of - [LOCATION_ID] will return all buckets. + Required. The parent resource whose buckets + are to be listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + + Note: The locations portion of the resource must + be specified, but supplying the character `-` in + place of [LOCATION_ID] will return all buckets. page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. page_size (int): - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Non-positive values + are ignored. The presence of `nextPageToken` in + the response indicates that more results might + be available. """ parent: str = proto.Field( @@ -745,10 +764,11 @@ class ListBucketsResponse(proto.Message): buckets (MutableSequence[google.cloud.logging_v2.types.LogBucket]): A list of buckets. next_page_token (str): - If there might be more results than appear in this response, - then ``nextPageToken`` is included. To get the next set of - results, call the same method again using the value of - ``nextPageToken`` as ``pageToken``. + If there might be more results than appear in + this response, then `nextPageToken` is included. + To get the next set of results, call the same + method again using the value of `nextPageToken` + as `pageToken`. """ @property @@ -767,24 +787,22 @@ def raw_page(self): class CreateBucketRequest(proto.Message): - r"""The parameters to ``CreateBucket``. + r"""The parameters to `CreateBucket`. Attributes: parent (str): - Required. The resource in which to create the log bucket: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + Required. The resource in which to create the + log bucket: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For example: - ``"projects/my-project/locations/global"`` + `"projects/my-project/locations/global"` bucket_id (str): - Required. A client-assigned identifier such as - ``"my-bucket"``. Identifiers are limited to 100 characters - and can include only letters, digits, underscores, hyphens, - and periods. + Required. A client-assigned identifier such + as `"my-bucket"`. Identifiers are limited to 100 + characters and can include only letters, digits, + underscores, hyphens, and periods. bucket (google.cloud.logging_v2.types.LogBucket): Required. The new bucket. The region specified in the new bucket must be compliant @@ -808,34 +826,34 @@ class CreateBucketRequest(proto.Message): class UpdateBucketRequest(proto.Message): - r"""The parameters to ``UpdateBucket``. + r"""The parameters to `UpdateBucket`. Attributes: name (str): - Required. The full resource name of the bucket to update. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The full resource name of the + bucket to update. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket"`` + `"projects/my-project/locations/global/buckets/my-bucket"` bucket (google.cloud.logging_v2.types.LogBucket): Required. The updated bucket. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Required. Field mask that specifies the fields in ``bucket`` - that need an update. A bucket field will be overwritten if, - and only if, it is in the update mask. ``name`` and output - only fields cannot be updated. + Required. Field mask that specifies the + fields in `bucket` that need an update. A bucket + field will be overwritten if, and only if, it is + in the update mask. `name` and output only + fields cannot be updated. + + For a detailed `FieldMask` definition, see: - For a detailed ``FieldMask`` definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - For example: ``updateMask=retention_days`` + For example: `updateMask=retention_days` """ name: str = proto.Field( @@ -855,22 +873,20 @@ class UpdateBucketRequest(proto.Message): class GetBucketRequest(proto.Message): - r"""The parameters to ``GetBucket``. + r"""The parameters to `GetBucket`. Attributes: name (str): Required. The resource name of the bucket: - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket"`` + `"projects/my-project/locations/global/buckets/my-bucket"` """ name: str = proto.Field( @@ -880,22 +896,20 @@ class GetBucketRequest(proto.Message): class DeleteBucketRequest(proto.Message): - r"""The parameters to ``DeleteBucket``. + r"""The parameters to `DeleteBucket`. Attributes: name (str): - Required. The full resource name of the bucket to delete. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The full resource name of the + bucket to delete. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket"`` + `"projects/my-project/locations/global/buckets/my-bucket"` """ name: str = proto.Field( @@ -905,22 +919,20 @@ class DeleteBucketRequest(proto.Message): class UndeleteBucketRequest(proto.Message): - r"""The parameters to ``UndeleteBucket``. + r"""The parameters to `UndeleteBucket`. Attributes: name (str): - Required. The full resource name of the bucket to undelete. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The full resource name of the + bucket to undelete. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket"`` + `"projects/my-project/locations/global/buckets/my-bucket"` """ name: str = proto.Field( @@ -930,28 +942,26 @@ class UndeleteBucketRequest(proto.Message): class ListViewsRequest(proto.Message): - r"""The parameters to ``ListViews``. + r"""The parameters to `ListViews`. Attributes: parent (str): - Required. The bucket whose views are to be listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". + Required. The bucket whose views are to be + listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. page_size (int): - Optional. The maximum number of results to return from this - request. - + Optional. The maximum number of results to + return from this request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + `nextPageToken` in the response indicates that + more results might be available. """ parent: str = proto.Field( @@ -975,10 +985,11 @@ class ListViewsResponse(proto.Message): views (MutableSequence[google.cloud.logging_v2.types.LogView]): A list of views. next_page_token (str): - If there might be more results than appear in this response, - then ``nextPageToken`` is included. To get the next set of - results, call the same method again using the value of - ``nextPageToken`` as ``pageToken``. + If there might be more results than appear in + this response, then `nextPageToken` is included. + To get the next set of results, call the same + method again using the value of `nextPageToken` + as `pageToken`. """ @property @@ -997,24 +1008,22 @@ def raw_page(self): class CreateViewRequest(proto.Message): - r"""The parameters to ``CreateView``. + r"""The parameters to `CreateView`. Attributes: parent (str): - Required. The bucket in which to create the view - - :: - - `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` + Required. The bucket in which to create the + view + `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` For example: - ``"projects/my-project/locations/global/buckets/my-bucket"`` + `"projects/my-project/locations/global/buckets/my-bucket"` view_id (str): - Required. A client-assigned identifier such as - ``"my-view"``. Identifiers are limited to 100 characters and - can include only letters, digits, underscores, hyphens, and - periods. + Required. A client-assigned identifier such + as `"my-view"`. Identifiers are limited to 100 + characters and can include only letters, digits, + underscores, hyphens, and periods. view (google.cloud.logging_v2.types.LogView): Required. The new view. """ @@ -1035,31 +1044,30 @@ class CreateViewRequest(proto.Message): class UpdateViewRequest(proto.Message): - r"""The parameters to ``UpdateView``. + r"""The parameters to `UpdateView`. Attributes: name (str): - Required. The full resource name of the view to update - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + Required. The full resource name of the view + to update + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket/views/my-view"`` + `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` view (google.cloud.logging_v2.types.LogView): Required. The updated view. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask that specifies the fields in ``view`` - that need an update. A field will be overwritten if, and - only if, it is in the update mask. ``name`` and output only - fields cannot be updated. + Optional. Field mask that specifies the + fields in `view` that need an update. A field + will be overwritten if, and only if, it is in + the update mask. `name` and output only fields + cannot be updated. - For a detailed ``FieldMask`` definition, see + For a detailed `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - For example: ``updateMask=filter`` + For example: `updateMask=filter` """ name: str = proto.Field( @@ -1079,19 +1087,17 @@ class UpdateViewRequest(proto.Message): class GetViewRequest(proto.Message): - r"""The parameters to ``GetView``. + r"""The parameters to `GetView`. Attributes: name (str): Required. The resource name of the policy: - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket/views/my-view"`` + `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` """ name: str = proto.Field( @@ -1101,21 +1107,17 @@ class GetViewRequest(proto.Message): class DeleteViewRequest(proto.Message): - r"""The parameters to ``DeleteView``. + r"""The parameters to `DeleteView`. Attributes: name (str): - Required. The full resource name of the view to delete: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + Required. The full resource name of the view + to delete: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example: - :: - - `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` """ name: str = proto.Field( @@ -1125,29 +1127,29 @@ class DeleteViewRequest(proto.Message): class ListSinksRequest(proto.Message): - r"""The parameters to ``ListSinks``. + r"""The parameters to `ListSinks`. Attributes: parent (str): - Required. The parent resource whose sinks are to be listed: - - :: - + Required. The parent resource whose sinks are + to be listed: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]". page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. page_size (int): - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Non-positive values + are ignored. The presence of `nextPageToken` in + the response indicates that more results might + be available. """ parent: str = proto.Field( @@ -1165,16 +1167,17 @@ class ListSinksRequest(proto.Message): class ListSinksResponse(proto.Message): - r"""Result returned from ``ListSinks``. + r"""Result returned from `ListSinks`. Attributes: sinks (MutableSequence[google.cloud.logging_v2.types.LogSink]): A list of sinks. next_page_token (str): - If there might be more results than appear in this response, - then ``nextPageToken`` is included. To get the next set of - results, call the same method again using the value of - ``nextPageToken`` as ``pageToken``. + If there might be more results than appear in + this response, then `nextPageToken` is included. + To get the next set of results, call the same + method again using the value of `nextPageToken` + as `pageToken`. """ @property @@ -1193,22 +1196,20 @@ def raw_page(self): class GetSinkRequest(proto.Message): - r"""The parameters to ``GetSink``. + r"""The parameters to `GetSink`. Attributes: sink_name (str): Required. The resource name of the sink: - :: - - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` """ sink_name: str = proto.Field( @@ -1218,14 +1219,12 @@ class GetSinkRequest(proto.Message): class CreateSinkRequest(proto.Message): - r"""The parameters to ``CreateSink``. + r"""The parameters to `CreateSink`. Attributes: parent (str): - Required. The resource in which to create the sink: - - :: - + Required. The resource in which to create the + sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" @@ -1233,25 +1232,29 @@ class CreateSinkRequest(proto.Message): For examples: - ``"projects/my-project"`` ``"organizations/123456789"`` + `"projects/my-project"` + `"organizations/123456789"` sink (google.cloud.logging_v2.types.LogSink): - Required. The new sink, whose ``name`` parameter is a sink - identifier that is not already in use. + Required. The new sink, whose `name` + parameter is a sink identifier that is not + already in use. unique_writer_identity (bool): - Optional. Determines the kind of IAM identity returned as - ``writer_identity`` in the new sink. If this value is - omitted or set to false, and if the sink's parent is a - project, then the value returned as ``writer_identity`` is - the same group or service account used by Cloud Logging - before the addition of writer identities to this API. The - sink's destination must be in the same project as the sink - itself. - - If this field is set to true, or if the sink is owned by a - non-project resource such as an organization, then the value - of ``writer_identity`` will be a unique service account used - only for exports from the new sink. For more information, - see ``writer_identity`` in + Optional. Determines the kind of IAM identity + returned as `writer_identity` in the new sink. + If this value is omitted or set to false, and if + the sink's parent is a project, then the value + returned as `writer_identity` is the same group + or service account used by Cloud Logging before + the addition of writer identities to this API. + The sink's destination must be in the same + project as the sink itself. + + If this field is set to true, or if the sink is + owned by a non-project resource such as an + organization, then the value of + `writer_identity` will be a unique service + account used only for exports from the new sink. + For more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. """ @@ -1271,60 +1274,64 @@ class CreateSinkRequest(proto.Message): class UpdateSinkRequest(proto.Message): - r"""The parameters to ``UpdateSink``. + r"""The parameters to `UpdateSink`. Attributes: sink_name (str): - Required. The full resource name of the sink to update, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of the sink + to update, including the parent resource and the + sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` sink (google.cloud.logging_v2.types.LogSink): - Required. The updated sink, whose name is the same - identifier that appears as part of ``sink_name``. + Required. The updated sink, whose name is the + same identifier that appears as part of + `sink_name`. unique_writer_identity (bool): Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - for a description of this field. When updating a sink, the - effect of this field on the value of ``writer_identity`` in - the updated sink depends on both the old and new values of - this field: - - - If the old and new values of this field are both false or - both true, then there is no change to the sink's - ``writer_identity``. - - If the old value is false and the new value is true, then - ``writer_identity`` is changed to a unique service - account. - - It is an error if the old value is true and the new value - is set to false or defaulted to false. + for a description of this field. When updating a + sink, the effect of this field on the value of + `writer_identity` in the updated sink depends on + both the old and new values of this field: + + + If the old and new values of this field are + both false or both true, then there is no + change to the sink's `writer_identity`. + + If the old value is false and the new value + is true, then `writer_identity` is changed + to a unique service account. + + It is an error if the old value is true and + the new value is set to false or defaulted + to false. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask that specifies the fields in ``sink`` - that need an update. A sink field will be overwritten if, - and only if, it is in the update mask. ``name`` and output - only fields cannot be updated. + Optional. Field mask that specifies the + fields in `sink` that need an update. A sink + field will be overwritten if, and only if, it is + in the update mask. `name` and output only + fields cannot be updated. - An empty ``updateMask`` is temporarily treated as using the - following mask for backwards compatibility purposes: + An empty `updateMask` is temporarily treated as + using the following mask for backwards + compatibility purposes: - ``destination,filter,includeChildren`` + `destination,filter,includeChildren` - At some point in the future, behavior will be removed and - specifying an empty ``updateMask`` will be an error. + At some point in the future, behavior will be + removed and specifying an empty `updateMask` + will be an error. - For a detailed ``FieldMask`` definition, see + For a detailed `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - For example: ``updateMask=filter`` + For example: `updateMask=filter` """ sink_name: str = proto.Field( @@ -1348,23 +1355,22 @@ class UpdateSinkRequest(proto.Message): class DeleteSinkRequest(proto.Message): - r"""The parameters to ``DeleteSink``. + r"""The parameters to `DeleteSink`. Attributes: sink_name (str): - Required. The full resource name of the sink to delete, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of the sink + to delete, including the parent resource and the + sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` """ sink_name: str = proto.Field( @@ -1378,21 +1384,19 @@ class CreateLinkRequest(proto.Message): Attributes: parent (str): - Required. The full resource name of the bucket to create a - link for. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". + Required. The full resource name of the + bucket to create a link for. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". link (google.cloud.logging_v2.types.Link): Required. The new link. link_id (str): - Required. The ID to use for the link. The link_id can have - up to 100 characters. A valid link_id must only have - alphanumeric characters and underscores within it. + Required. The ID to use for the link. The + link_id can have up to 100 characters. A valid + link_id must only have alphanumeric characters + and underscores within it. """ parent: str = proto.Field( @@ -1415,8 +1419,8 @@ class DeleteLinkRequest(proto.Message): Attributes: name (str): - Required. The full resource name of the link to delete. - + Required. The full resource name of the link + to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" @@ -1434,17 +1438,17 @@ class ListLinksRequest(proto.Message): Attributes: parent (str): - Required. The parent resource whose links are to be listed: - + Required. The parent resource whose links are + to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. page_size (int): Optional. The maximum number of results to return from this request. @@ -1471,10 +1475,11 @@ class ListLinksResponse(proto.Message): links (MutableSequence[google.cloud.logging_v2.types.Link]): A list of links. next_page_token (str): - If there might be more results than those appearing in this - response, then ``nextPageToken`` is included. To get the - next set of results, call the same method again using the - value of ``nextPageToken`` as ``pageToken``. + If there might be more results than those + appearing in this response, then `nextPageToken` + is included. To get the next set of results, + call the same method again using the value of + `nextPageToken` as `pageToken`. """ @property @@ -1512,37 +1517,42 @@ class GetLinkRequest(proto.Message): class LogExclusion(proto.Message): - r"""Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of log entries, - you can use exclusions to reduce your chargeable logs. Note that - exclusions on organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify the \_Required - sink or exclude logs from it. + r"""Specifies a set of log entries that are filtered out by a + sink. If your Google Cloud resource receives a large volume of + log entries, you can use exclusions to reduce your chargeable + logs. Note that exclusions on organization-level and + folder-level sinks don't apply to child resources. Note also + that you cannot modify the _Required sink or exclude logs from + it. Attributes: name (str): - Required. A client-assigned identifier, such as - ``"load-balancer-exclusion"``. Identifiers are limited to - 100 characters and can include only letters, digits, - underscores, hyphens, and periods. First character has to be - alphanumeric. + Required. A client-assigned identifier, such + as `"load-balancer-exclusion"`. Identifiers are + limited to 100 characters and can include only + letters, digits, underscores, hyphens, and + periods. First character has to be alphanumeric. description (str): Optional. A description of this exclusion. filter (str): - Required. An `advanced logs - filter `__ - that matches the log entries to be excluded. By using the - `sample - function `__, - you can exclude less than 100% of the matching log entries. - - For example, the following query matches 99% of low-severity - log entries from Google Cloud Storage buckets: - - ``resource.type=gcs_bucket severity`__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Attributes: name (str): - Required. The resource for which to retrieve CMEK settings. - - :: - + Required. The resource for which to retrieve + CMEK settings. "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" For example: - ``"organizations/12345/cmekSettings"`` + `"organizations/12345/cmekSettings"` - Note: CMEK for the Log Router can be configured for Google - Cloud projects, folders, organizations and billing accounts. - Once configured for an organization, it applies to all - projects and folders in the Google Cloud organization. + Note: CMEK for the Log Router can be configured + for Google Cloud projects, folders, + organizations and billing accounts. Once + configured for an organization, it applies to + all projects and folders in the Google Cloud + organization. """ name: str = proto.Field( @@ -1829,45 +1832,44 @@ class UpdateCmekSettingsRequest(proto.Message): r"""The parameters to [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Attributes: name (str): - Required. The resource name for the CMEK settings to update. - - :: - + Required. The resource name for the CMEK + settings to update. "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" For example: - ``"organizations/12345/cmekSettings"`` + `"organizations/12345/cmekSettings"` - Note: CMEK for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, - it applies to all projects and folders in the Google Cloud - organization. + Note: CMEK for the Log Router can currently only + be configured for Google Cloud organizations. + Once configured, it applies to all projects and + folders in the Google Cloud organization. cmek_settings (google.cloud.logging_v2.types.CmekSettings): Required. The CMEK settings to update. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask identifying which fields from - ``cmek_settings`` should be updated. A field will be - overwritten if and only if it is in the update mask. Output - only fields cannot be updated. + Optional. Field mask identifying which fields + from `cmek_settings` should be updated. A field + will be overwritten if and only if it is in the + update mask. Output only fields cannot be + updated. - See [FieldMask][google.protobuf.FieldMask] for more - information. + See [FieldMask][google.protobuf.FieldMask] for + more information. - For example: ``"updateMask=kmsKeyName"`` + For example: `"updateMask=kmsKeyName"` """ name: str = proto.Field( @@ -1888,15 +1890,15 @@ class UpdateCmekSettingsRequest(proto.Message): class CmekSettings(proto.Message): r"""Describes the customer-managed encryption key (CMEK) settings - associated with a project, folder, organization, billing account, or - flexible resource. + associated with a project, folder, organization, billing + account, or flexible resource. - Note: CMEK for the Log Router can currently only be configured for - Google Cloud organizations. Once configured, it applies to all - projects and folders in the Google Cloud organization. + Note: CMEK for the Log Router can currently only be configured + for Google Cloud organizations. Once configured, it applies to + all projects and folders in the Google Cloud organization. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Attributes: @@ -1904,72 +1906,72 @@ class CmekSettings(proto.Message): Output only. The resource name of the CMEK settings. kms_key_name (str): - The resource name for the configured Cloud KMS key. - + The resource name for the configured Cloud + KMS key. KMS key name format: - :: - - "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" For example: - ``"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`` + `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - To enable CMEK for the Log Router, set this field to a valid - ``kms_key_name`` for which the associated service account - has the required cloudkms.cryptoKeyEncrypterDecrypter roles + To enable CMEK for the Log Router, set this + field to a valid `kms_key_name` for which the + associated service account has the required + cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. - The Cloud KMS key used by the Log Router can be updated by - changing the ``kms_key_name`` to a new valid key name or - disabled by setting the key name to an empty string. - Encryption operations that are in progress will be completed - with the key that was in use when they started. Decryption - operations will be completed using the key that was used at - the time of encryption unless access to that key has been - revoked. - - To disable CMEK for the Log Router, set this field to an - empty string. - - See `Enabling CMEK for Log - Router `__ + The Cloud KMS key used by the Log Router can be + updated by changing the `kms_key_name` to a new + valid key name or disabled by setting the key + name to an empty string. Encryption operations + that are in progress will be completed with the + key that was in use when they started. + Decryption operations will be completed using + the key that was used at the time of encryption + unless access to that key has been revoked. + + To disable CMEK for the Log Router, set this + field to an empty string. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. kms_key_version_name (str): - The CryptoKeyVersion resource name for the configured Cloud - KMS key. - + The CryptoKeyVersion resource name for the + configured Cloud KMS key. KMS key name format: - :: - - "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" + "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" For example: - ``"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"`` + `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` - This is a read-only field used to convey the specific - configured CryptoKeyVersion of ``kms_key`` that has been - configured. It will be populated in cases where the CMEK - settings are bound to a single key version. + This is a read-only field used to convey the + specific configured CryptoKeyVersion of + `kms_key` that has been configured. It will be + populated in cases where the CMEK settings are + bound to a single key version. - If this field is populated, the ``kms_key`` is tied to a - specific CryptoKeyVersion. + If this field is populated, the `kms_key` is + tied to a specific CryptoKeyVersion. service_account_id (str): - Output only. The service account that will be used by the - Log Router to access your Cloud KMS key. + Output only. The service account that will be + used by the Log Router to access your Cloud KMS + key. - Before enabling CMEK for Log Router, you must first assign - the cloudkms.cryptoKeyEncrypterDecrypter role to the service - account that the Log Router will use to access your Cloud - KMS key. Use + Before enabling CMEK for Log Router, you must + first assign the + cloudkms.cryptoKeyEncrypterDecrypter role to the + service account that the Log Router will use to + access your Cloud KMS key. Use [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to obtain the service account ID. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. """ @@ -1995,29 +1997,28 @@ class GetSettingsRequest(proto.Message): r"""The parameters to [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Attributes: name (str): - Required. The resource for which to retrieve settings. - - :: - + Required. The resource for which to retrieve + settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" - "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - "folders/[FOLDER_ID]/settings" + "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + "folders/[FOLDER_ID]/settings" For example: - ``"organizations/12345/settings"`` + `"organizations/12345/settings"` - Note: Settings for the Log Router can be get for Google - Cloud projects, folders, organizations and billing accounts. - Currently it can only be configured for organizations. Once - configured for an organization, it applies to all projects + Note: Settings for the Log Router can be get for + Google Cloud projects, folders, organizations + and billing accounts. Currently it can only be + configured for organizations. Once configured + for an organization, it applies to all projects and folders in the Google Cloud organization. """ @@ -2031,42 +2032,42 @@ class UpdateSettingsRequest(proto.Message): r"""The parameters to [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Attributes: name (str): - Required. The resource name for the settings to update. - - :: - + Required. The resource name for the settings + to update. "organizations/[ORGANIZATION_ID]/settings" For example: - ``"organizations/12345/settings"`` + `"organizations/12345/settings"` - Note: Settings for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, - it applies to all projects and folders in the Google Cloud + Note: Settings for the Log Router can currently + only be configured for Google Cloud + organizations. Once configured, it applies to + all projects and folders in the Google Cloud organization. settings (google.cloud.logging_v2.types.Settings): Required. The settings to update. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask identifying which fields from - ``settings`` should be updated. A field will be overwritten - if and only if it is in the update mask. Output only fields - cannot be updated. + Optional. Field mask identifying which fields + from `settings` should be updated. A field will + be overwritten if and only if it is in the + update mask. Output only fields cannot be + updated. - See [FieldMask][google.protobuf.FieldMask] for more - information. + See [FieldMask][google.protobuf.FieldMask] for + more information. - For example: ``"updateMask=kmsKeyName"`` + For example: `"updateMask=kmsKeyName"` """ name: str = proto.Field( @@ -2094,64 +2095,66 @@ class Settings(proto.Message): Output only. The resource name of the settings. kms_key_name (str): - Optional. The resource name for the configured Cloud KMS - key. - + Optional. The resource name for the + configured Cloud KMS key. KMS key name format: - :: - - "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" For example: - ``"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`` + `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - To enable CMEK for the Log Router, set this field to a valid - ``kms_key_name`` for which the associated service account - has the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned - for the key. + To enable CMEK for the Log Router, set this + field to a valid `kms_key_name` for which the + associated service account has the required + `roles/cloudkms.cryptoKeyEncrypterDecrypter` + role assigned for the key. - The Cloud KMS key used by the Log Router can be updated by - changing the ``kms_key_name`` to a new valid key name. - Encryption operations that are in progress will be completed - with the key that was in use when they started. Decryption - operations will be completed using the key that was used at - the time of encryption unless access to that key has been - revoked. + The Cloud KMS key used by the Log Router can be + updated by changing the `kms_key_name` to a new + valid key name. Encryption operations that are + in progress will be completed with the key that + was in use when they started. Decryption + operations will be completed using the key that + was used at the time of encryption unless access + to that key has been revoked. - To disable CMEK for the Log Router, set this field to an - empty string. + To disable CMEK for the Log Router, set this + field to an empty string. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. kms_service_account_id (str): - Output only. The service account that will be used by the - Log Router to access your Cloud KMS key. + Output only. The service account that will be + used by the Log Router to access your Cloud KMS + key. - Before enabling CMEK for Log Router, you must first assign - the role ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` to - the service account that the Log Router will use to access - your Cloud KMS key. Use + Before enabling CMEK for Log Router, you must + first assign the role + `roles/cloudkms.cryptoKeyEncrypterDecrypter` to + the service account that the Log Router will use + to access your Cloud KMS key. Use [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to obtain the service account ID. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. storage_location (str): - Optional. The Cloud region that will be used for \_Default - and \_Required log buckets for newly created projects and - folders. For example ``europe-west1``. This setting does not - affect the location of custom log buckets. + Optional. The Cloud region that will be used + for _Default and _Required log buckets for newly + created projects and folders. For example + `europe-west1`. This setting does not affect the + location of custom log buckets. disable_default_sink (bool): - Optional. If set to true, the \_Default sink in newly - created projects and folders will created in a disabled - state. This can be used to automatically disable log - ingestion if there is already an aggregated sink configured - in the hierarchy. The \_Default sink can be re-enabled + Optional. If set to true, the _Default sink + in newly created projects and folders will + created in a disabled state. This can be used to + automatically disable log ingestion if there is + already an aggregated sink configured in the + hierarchy. The _Default sink can be re-enabled manually if needed. """ @@ -2182,11 +2185,11 @@ class CopyLogEntriesRequest(proto.Message): Attributes: name (str): - Required. Log bucket from which to copy log entries. - + Required. Log bucket from which to copy log + entries. For example: - ``"projects/my-project/locations/global/buckets/my-source-bucket"`` + `"projects/my-project/locations/global/buckets/my-source-bucket"` filter (str): Optional. A filter specifying which log entries to copy. The filter must be no more than @@ -2230,13 +2233,14 @@ class CopyLogEntriesMetadata(proto.Message): Estimated progress of the operation (0 - 100%). writer_identity (str): - The IAM identity of a service account that must be granted - access to the destination. + The IAM identity of a service account that + must be granted access to the destination. - If the service account is not granted permission to the - destination within an hour, the operation will be cancelled. + If the service account is not granted permission + to the destination within an hour, the operation + will be cancelled. - For example: ``"serviceAccount:foo@bar.com"`` + For example: `"serviceAccount:foo@bar.com"` """ start_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging_metrics.py b/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging_metrics.py index d26267d8cf..5027b14d4a 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging_metrics.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/types/logging_metrics.py @@ -51,122 +51,137 @@ class LogMetric(proto.Message): Attributes: name (str): - Required. The client-assigned metric identifier. Examples: - ``"error_count"``, ``"nginx/requests"``. - - Metric identifiers are limited to 100 characters and can - include only the following characters: ``A-Z``, ``a-z``, - ``0-9``, and the special characters ``_-.,+!*',()%/``. The - forward-slash character (``/``) denotes a hierarchy of name - pieces, and it cannot be the first character of the name. - - This field is the ``[METRIC_ID]`` part of a metric resource - name in the format - "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the - resource name of a metric is - ``"projects/my-project/metrics/nginx%2Frequests"``, this - field's value is ``"nginx/requests"``. + Required. The client-assigned metric + identifier. Examples: `"error_count"`, + `"nginx/requests"`. + + Metric identifiers are limited to 100 characters + and can include only the following characters: + `A-Z`, `a-z`, `0-9`, and the special characters + `_-.,+!*',()%/`. The forward-slash character + (`/`) denotes a hierarchy of name pieces, and it + cannot be the first character of the name. + + This field is the `[METRIC_ID]` part of a metric + resource name in the format + "projects/[PROJECT_ID]/metrics/[METRIC_ID]". + Example: If the resource name of a metric is + `"projects/my-project/metrics/nginx%2Frequests"`, + this field's value is `"nginx/requests"`. description (str): Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. filter (str): - Required. An `advanced logs - filter `__ + Required. An [advanced logs + filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is used to match log entries. Example: - :: - "resource.type=gae_app AND severity>=ERROR" - The maximum length of the filter is 20000 characters. + The maximum length of the filter is 20000 + characters. bucket_name (str): - Optional. The resource name of the Log Bucket that owns the - Log Metric. Only Log Buckets in projects are supported. The - bucket has to be in the same project as the metric. + Optional. The resource name of the Log Bucket + that owns the Log Metric. Only Log Buckets in + projects are supported. The bucket has to be in + the same project as the metric. For example: - ``projects/my-project/locations/global/buckets/my-bucket`` + `projects/my-project/locations/global/buckets/my-bucket` - If empty, then the Log Metric is considered a non-Bucket Log - Metric. + If empty, then the Log Metric is considered a + non-Bucket Log Metric. disabled (bool): Optional. If set to True, then this metric is disabled and it does not generate any points. metric_descriptor (google.api.metric_pb2.MetricDescriptor): - Optional. The metric descriptor associated with the - logs-based metric. If unspecified, it uses a default metric - descriptor with a DELTA metric kind, INT64 value type, with - no labels and a unit of "1". Such a metric counts the number - of log entries matching the ``filter`` expression. - - The ``name``, ``type``, and ``description`` fields in the - ``metric_descriptor`` are output only, and is constructed - using the ``name`` and ``description`` field in the + Optional. The metric descriptor associated + with the logs-based metric. If unspecified, it + uses a default metric descriptor with a DELTA + metric kind, INT64 value type, with no labels + and a unit of "1". Such a metric counts the + number of log entries matching the `filter` + expression. + + The `name`, `type`, and `description` fields in + the `metric_descriptor` are output only, and is + constructed using the `name` and `description` + field in the LogMetric. + + To create a logs-based metric that records a + distribution of log values, a DELTA metric kind + with a DISTRIBUTION value type must be used + along with a `value_extractor` expression in the LogMetric. - To create a logs-based metric that records a distribution of - log values, a DELTA metric kind with a DISTRIBUTION value - type must be used along with a ``value_extractor`` - expression in the LogMetric. - - Each label in the metric descriptor must have a matching - label name as the key and an extractor expression as the - value in the ``label_extractors`` map. + Each label in the metric descriptor must have a + matching label name as the key and an extractor + expression as the value in the + `label_extractors` map. - The ``metric_kind`` and ``value_type`` fields in the - ``metric_descriptor`` cannot be updated once initially - configured. New labels can be added in the - ``metric_descriptor``, but existing labels cannot be - modified except for their description. + The `metric_kind` and `value_type` fields in the + `metric_descriptor` cannot be updated once + initially configured. New labels can be added in + the `metric_descriptor`, but existing labels + cannot be modified except for their description. value_extractor (str): - Optional. A ``value_extractor`` is required when using a - distribution logs-based metric to extract the values to - record from a log entry. Two functions are supported for - value extraction: ``EXTRACT(field)`` or - ``REGEXP_EXTRACT(field, regex)``. The arguments are: - - 1. field: The name of the log entry field from which the - value is to be extracted. - 2. regex: A regular expression using the Google RE2 syntax - (https://github.com/google/re2/wiki/Syntax) with a single - capture group to extract data from the specified log - entry field. The value of the field is converted to a - string before applying the regex. It is an error to - specify a regex that does not include exactly one capture - group. - - The result of the extraction must be convertible to a double - type, as the distribution always records double values. If - either the extraction or the conversion to double fails, - then those values are not recorded in the distribution. - - Example: - ``REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")`` + Optional. A `value_extractor` is required + when using a distribution logs-based metric to + extract the values to record from a log entry. + Two functions are supported for value + extraction: `EXTRACT(field)` or + `REGEXP_EXTRACT(field, regex)`. The arguments + are: + + 1. field: The name of the log entry field from + which the value is to be extracted. + 2. regex: A regular expression using the + Google RE2 syntax + (https://github.com/google/re2/wiki/Syntax) + with a single capture group to extract + data from the specified log entry field. The + value of the field is converted to a + string before applying the regex. It is + an error to specify a regex that does not + include exactly one capture group. + + The result of the extraction must be convertible + to a double type, as the distribution always + records double values. If either the extraction + or the conversion to double fails, then those + values are not recorded in the distribution. + + Example: `REGEXP_EXTRACT(jsonPayload.request, + ".*quantity=(\d+).*")` label_extractors (MutableMapping[str, str]): - Optional. A map from a label key string to an extractor - expression which is used to extract data from a log entry - field and assign as the label value. Each label key - specified in the LabelDescriptor must have an associated - extractor expression in this map. The syntax of the - extractor expression is the same as for the - ``value_extractor`` field. - - The extracted value is converted to the type defined in the - label descriptor. If either the extraction or the type - conversion fails, the label will have a default value. The - default value for a string label is an empty string, for an - integer label its 0, and for a boolean label its ``false``. - - Note that there are upper bounds on the maximum number of - labels and the number of active time series that are allowed - in a project. + Optional. A map from a label key string to an + extractor expression which is used to extract + data from a log entry field and assign as the + label value. Each label key specified in the + LabelDescriptor must have an associated + extractor expression in this map. The syntax of + the extractor expression is the same as for the + `value_extractor` field. + + The extracted value is converted to the type + defined in the label descriptor. If either the + extraction or the type conversion fails, the + label will have a default value. The default + value for a string label is an empty string, for + an integer label its 0, and for a boolean label + its `false`. + + Note that there are upper bounds on the maximum + number of labels and the number of active time + series that are allowed in a project. bucket_options (google.api.distribution_pb2.BucketOptions): - Optional. The ``bucket_options`` are required when the - logs-based metric is using a DISTRIBUTION value type and it - describes the bucket boundaries used to create a histogram - of the extracted values. + Optional. The `bucket_options` are required + when the logs-based metric is using a + DISTRIBUTION value type and it describes the + bucket boundaries used to create a histogram of + the extracted values. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The creation timestamp of the metric. @@ -253,22 +268,22 @@ class ListLogMetricsRequest(proto.Message): Attributes: parent (str): - Required. The name of the project containing the metrics: - - :: - + Required. The name of the project containing + the metrics: "projects/[PROJECT_ID]". page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. page_size (int): - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Non-positive values + are ignored. The presence of `nextPageToken` in + the response indicates that more results might + be available. """ parent: str = proto.Field( @@ -292,10 +307,11 @@ class ListLogMetricsResponse(proto.Message): metrics (MutableSequence[google.cloud.logging_v2.types.LogMetric]): A list of logs-based metrics. next_page_token (str): - If there might be more results than appear in this response, - then ``nextPageToken`` is included. To get the next set of - results, call this method again using the value of - ``nextPageToken`` as ``pageToken``. + If there might be more results than appear in + this response, then `nextPageToken` is included. + To get the next set of results, call this method + again using the value of `nextPageToken` as + `pageToken`. """ @property @@ -318,10 +334,8 @@ class GetLogMetricRequest(proto.Message): Attributes: metric_name (str): - Required. The resource name of the desired metric: - - :: - + Required. The resource name of the desired + metric: "projects/[PROJECT_ID]/metrics/[METRIC_ID]". """ @@ -336,11 +350,8 @@ class CreateLogMetricRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the project in which to - create the metric: - - :: - + Required. The resource name of the project in + which to create the metric: "projects/[PROJECT_ID]" The new metric must be provided in the request. @@ -365,16 +376,14 @@ class UpdateLogMetricRequest(proto.Message): Attributes: metric_name (str): - Required. The resource name of the metric to update: - - :: - + Required. The resource name of the metric to + update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - The updated metric must be provided in the request and it's - ``name`` field must be the same as ``[METRIC_ID]`` If the - metric does not exist in ``[PROJECT_ID]``, then a new metric - is created. + The updated metric must be provided in the + request and it's `name` field must be the same + as `[METRIC_ID]` If the metric does not exist in + `[PROJECT_ID]`, then a new metric is created. metric (google.cloud.logging_v2.types.LogMetric): Required. The updated metric. """ @@ -395,10 +404,8 @@ class DeleteLogMetricRequest(proto.Message): Attributes: metric_name (str): - Required. The resource name of the metric to delete: - - :: - + Required. The resource name of the metric to + delete: "projects/[PROJECT_ID]/metrics/[METRIC_ID]". """ diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/async_client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/async_client.py index ef5a9151a1..4a732e2576 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/async_client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/async_client.py @@ -304,20 +304,18 @@ async def sample_list_buckets(): Args: request (Optional[Union[google.cloud.logging_v2.types.ListBucketsRequest, dict]]): - The request object. The parameters to ``ListBuckets``. + The request object. The parameters to `ListBuckets`. parent (:class:`str`): - Required. The parent resource whose buckets are to be - listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - - Note: The locations portion of the resource must be - specified, but supplying the character ``-`` in place of + Required. The parent resource whose + buckets are to be listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + + Note: The locations portion of the + resource must be specified, but + supplying the character `-` in place of [LOCATION_ID] will return all buckets. This corresponds to the ``parent`` field @@ -433,7 +431,7 @@ async def sample_get_bucket(): Args: request (Optional[Union[google.cloud.logging_v2.types.GetBucketRequest, dict]]): - The request object. The parameters to ``GetBucket``. + The request object. The parameters to `GetBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -525,7 +523,7 @@ async def sample_create_bucket_async(): Args: request (Optional[Union[google.cloud.logging_v2.types.CreateBucketRequest, dict]]): - The request object. The parameters to ``CreateBucket``. + The request object. The parameters to `CreateBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -536,11 +534,13 @@ async def sample_create_bucket_async(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.LogBucket` - Describes a repository in which log entries are stored. + Describes a repository in which log + entries are stored. """ # Create or coerce a protobuf request object. @@ -592,11 +592,12 @@ async def update_bucket_async(self, ) -> operation_async.AsyncOperation: r"""Updates a log bucket asynchronously. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. .. code-block:: python @@ -630,7 +631,7 @@ async def sample_update_bucket_async(): Args: request (Optional[Union[google.cloud.logging_v2.types.UpdateBucketRequest, dict]]): - The request object. The parameters to ``UpdateBucket``. + The request object. The parameters to `UpdateBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -641,11 +642,13 @@ async def sample_update_bucket_async(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.LogBucket` - Describes a repository in which log entries are stored. + Describes a repository in which log + entries are stored. """ # Create or coerce a protobuf request object. @@ -728,7 +731,7 @@ async def sample_create_bucket(): Args: request (Optional[Union[google.cloud.logging_v2.types.CreateBucketRequest, dict]]): - The request object. The parameters to ``CreateBucket``. + The request object. The parameters to `CreateBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -784,11 +787,12 @@ async def update_bucket(self, ) -> logging_config.LogBucket: r"""Updates a log bucket. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. .. code-block:: python @@ -818,7 +822,7 @@ async def sample_update_bucket(): Args: request (Optional[Union[google.cloud.logging_v2.types.UpdateBucketRequest, dict]]): - The request object. The parameters to ``UpdateBucket``. + The request object. The parameters to `UpdateBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -874,10 +878,10 @@ async def delete_bucket(self, ) -> None: r"""Deletes a log bucket. - Changes the bucket's ``lifecycle_state`` to the - ``DELETE_REQUESTED`` state. After 7 days, the bucket will be - purged and all log entries in the bucket will be permanently - deleted. + Changes the bucket's `lifecycle_state` to the + `DELETE_REQUESTED` state. After 7 days, the bucket will + be purged and all log entries in the bucket will be + permanently deleted. .. code-block:: python @@ -904,7 +908,7 @@ async def sample_delete_bucket(): Args: request (Optional[Union[google.cloud.logging_v2.types.DeleteBucketRequest, dict]]): - The request object. The parameters to ``DeleteBucket``. + The request object. The parameters to `DeleteBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -978,7 +982,7 @@ async def sample_undelete_bucket(): Args: request (Optional[Union[google.cloud.logging_v2.types.UndeleteBucketRequest, dict]]): - The request object. The parameters to ``UndeleteBucket``. + The request object. The parameters to `UndeleteBucket`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1055,13 +1059,11 @@ async def sample_list_views(): Args: request (Optional[Union[google.cloud.logging_v2.types.ListViewsRequest, dict]]): - The request object. The parameters to ``ListViews``. + The request object. The parameters to `ListViews`. parent (:class:`str`): - Required. The bucket whose views are to be listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The bucket whose views are + to be listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1176,7 +1178,7 @@ async def sample_get_view(): Args: request (Optional[Union[google.cloud.logging_v2.types.GetViewRequest, dict]]): - The request object. The parameters to ``GetView``. + The request object. The parameters to `GetView`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1262,7 +1264,7 @@ async def sample_create_view(): Args: request (Optional[Union[google.cloud.logging_v2.types.CreateViewRequest, dict]]): - The request object. The parameters to ``CreateView``. + The request object. The parameters to `CreateView`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1316,11 +1318,12 @@ async def _update_view(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogView: - r"""Updates a view on a log bucket. This method replaces the - following fields in the existing view with values from the new - view: ``filter``. If an ``UNAVAILABLE`` error is returned, this - indicates that system is not in a state where it can update the - view. If this occurs, please try again in a few minutes. + r"""Updates a view on a log bucket. This method replaces + the following fields in the existing view with values + from the new view: `filter`. If an `UNAVAILABLE` error + is returned, this indicates that system is not in a + state where it can update the view. If this occurs, + please try again in a few minutes. .. code-block:: python @@ -1350,7 +1353,7 @@ async def sample_update_view(): Args: request (Optional[Union[google.cloud.logging_v2.types.UpdateViewRequest, dict]]): - The request object. The parameters to ``UpdateView``. + The request object. The parameters to `UpdateView`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1404,10 +1407,10 @@ async def _delete_view(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a view on a log bucket. If an ``UNAVAILABLE`` error is - returned, this indicates that system is not in a state where it - can delete the view. If this occurs, please try again in a few - minutes. + r"""Deletes a view on a log bucket. + If an `UNAVAILABLE` error is returned, this indicates + that system is not in a state where it can delete the + view. If this occurs, please try again in a few minutes. .. code-block:: python @@ -1434,7 +1437,7 @@ async def sample_delete_view(): Args: request (Optional[Union[google.cloud.logging_v2.types.DeleteViewRequest, dict]]): - The request object. The parameters to ``DeleteView``. + The request object. The parameters to `DeleteView`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1511,17 +1514,14 @@ async def sample_list_sinks(): Args: request (Optional[Union[google.cloud.logging_v2.types.ListSinksRequest, dict]]): - The request object. The parameters to ``ListSinks``. + The request object. The parameters to `ListSinks`. parent (:class:`str`): - Required. The parent resource whose sinks are to be - listed: - - :: - + Required. The parent resource whose + sinks are to be listed: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1536,10 +1536,11 @@ async def sample_list_sinks(): Returns: google.cloud.logging_v2.services.config_service_v2.pagers.ListSinksAsyncPager: - Result returned from ListSinks. + Result returned from `ListSinks`. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1636,20 +1637,18 @@ async def sample_get_sink(): Args: request (Optional[Union[google.cloud.logging_v2.types.GetSinkRequest, dict]]): - The request object. The parameters to ``GetSink``. + The request object. The parameters to `GetSink`. sink_name (:class:`str`): - Required. The resource name of the sink: - - :: - - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + Required. The resource name of the + sink: + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1729,11 +1728,12 @@ async def _create_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogSink: - r"""Creates a sink that exports specified log entries to a - destination. The export of newly-ingested log entries begins - immediately, unless the sink's ``writer_identity`` is not - permitted to write to the destination. A sink can export log - entries only from the resource owning the sink. + r"""Creates a sink that exports specified log entries to + a destination. The export of newly-ingested log entries + begins immediately, unless the sink's `writer_identity` + is not permitted to write to the destination. A sink can + export log entries only from the resource owning the + sink. .. code-block:: python @@ -1768,27 +1768,27 @@ async def sample_create_sink(): Args: request (Optional[Union[google.cloud.logging_v2.types.CreateSinkRequest, dict]]): - The request object. The parameters to ``CreateSink``. + The request object. The parameters to `CreateSink`. parent (:class:`str`): - Required. The resource in which to create the sink: - - :: - + Required. The resource in which to + create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" For examples: - ``"projects/my-project"`` ``"organizations/123456789"`` + `"projects/my-project"` + `"organizations/123456789"` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. sink (:class:`google.cloud.logging_v2.types.LogSink`): - Required. The new sink, whose ``name`` parameter is a - sink identifier that is not already in use. + Required. The new sink, whose `name` + parameter is a sink identifier that is + not already in use. This corresponds to the ``sink`` field on the ``request`` instance; if ``request`` is provided, this @@ -1871,12 +1871,13 @@ async def _update_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogSink: - r"""Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, - and ``filter``. + r"""Updates a sink. This method replaces the following + fields in the existing sink with values from the new + sink: `destination`, and `filter`. - The updated sink might also have a new ``writer_identity``; see - the ``unique_writer_identity`` field. + The updated sink might also have a new + `writer_identity`; see the `unique_writer_identity` + field. .. code-block:: python @@ -1911,50 +1912,55 @@ async def sample_update_sink(): Args: request (Optional[Union[google.cloud.logging_v2.types.UpdateSinkRequest, dict]]): - The request object. The parameters to ``UpdateSink``. + The request object. The parameters to `UpdateSink`. sink_name (:class:`str`): - Required. The full resource name of the sink to update, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of + the sink to update, including the parent + resource and the sink identifier: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. sink (:class:`google.cloud.logging_v2.types.LogSink`): - Required. The updated sink, whose name is the same - identifier that appears as part of ``sink_name``. + Required. The updated sink, whose + name is the same identifier that appears + as part of `sink_name`. This corresponds to the ``sink`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Optional. Field mask that specifies the fields in - ``sink`` that need an update. A sink field will be - overwritten if, and only if, it is in the update mask. - ``name`` and output only fields cannot be updated. + Optional. Field mask that specifies + the fields in `sink` that need an + update. A sink field will be overwritten + if, and only if, it is in the update + mask. `name` and output only fields + cannot be updated. - An empty ``updateMask`` is temporarily treated as using - the following mask for backwards compatibility purposes: + An empty `updateMask` is temporarily + treated as using the following mask for + backwards compatibility purposes: - ``destination,filter,includeChildren`` + `destination,filter,includeChildren` - At some point in the future, behavior will be removed - and specifying an empty ``updateMask`` will be an error. + At some point in the future, behavior + will be removed and specifying an empty + `updateMask` will be an error. - For a detailed ``FieldMask`` definition, see + For a detailed `FieldMask` definition, + see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - For example: ``updateMask=filter`` + For example: `updateMask=filter` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -2037,8 +2043,9 @@ async def _delete_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a sink. If the sink has a unique ``writer_identity``, - then that service account is also deleted. + r"""Deletes a sink. If the sink has a unique + `writer_identity`, then that service account is also + deleted. .. code-block:: python @@ -2065,21 +2072,20 @@ async def sample_delete_sink(): Args: request (Optional[Union[google.cloud.logging_v2.types.DeleteSinkRequest, dict]]): - The request object. The parameters to ``DeleteSink``. + The request object. The parameters to `DeleteSink`. sink_name (:class:`str`): - Required. The full resource name of the sink to delete, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of + the sink to delete, including the parent + resource and the sink identifier: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -2184,15 +2190,12 @@ async def sample_create_link(): request (Optional[Union[google.cloud.logging_v2.types.CreateLinkRequest, dict]]): The request object. The parameters to CreateLink. parent (:class:`str`): - Required. The full resource name of the bucket to create - a link for. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The full resource name of + the bucket to create a link for. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -2203,9 +2206,11 @@ async def sample_create_link(): on the ``request`` instance; if ``request`` is provided, this should not be set. link_id (:class:`str`): - Required. The ID to use for the link. The link_id can - have up to 100 characters. A valid link_id must only - have alphanumeric characters and underscores within it. + Required. The ID to use for the link. + The link_id can have up to 100 + characters. A valid link_id must only + have alphanumeric characters and + underscores within it. This corresponds to the ``link_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -2220,11 +2225,13 @@ async def sample_create_link(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.logging_v2.types.Link` Describes a - link connected to an analytics enabled bucket. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.logging_v2.types.Link` + Describes a link connected to an + analytics enabled bucket. """ # Create or coerce a protobuf request object. @@ -2329,8 +2336,8 @@ async def sample_delete_link(): request (Optional[Union[google.cloud.logging_v2.types.DeleteLinkRequest, dict]]): The request object. The parameters to DeleteLink. name (:class:`str`): - Required. The full resource name of the link to delete. - + Required. The full resource name of + the link to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" @@ -2349,18 +2356,21 @@ async def sample_delete_link(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -2457,9 +2467,8 @@ async def sample_list_links(): request (Optional[Union[google.cloud.logging_v2.types.ListLinksRequest, dict]]): The request object. The parameters to ListLinks. parent (:class:`str`): - Required. The parent resource whose links are to be - listed: - + Required. The parent resource whose + links are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" @@ -2581,8 +2590,8 @@ async def sample_get_link(): request (Optional[Union[google.cloud.logging_v2.types.GetLinkRequest, dict]]): The request object. The parameters to GetLink. name (:class:`str`): - Required. The resource name of the link: - + Required. The resource name of the + link: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" @@ -2658,8 +2667,8 @@ async def _list_exclusions(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListExclusionsAsyncPager: - r"""Lists all the exclusions on the \_Default sink in a parent - resource. + r"""Lists all the exclusions on the _Default sink in a + parent resource. .. code-block:: python @@ -2690,17 +2699,14 @@ async def sample_list_exclusions(): Args: request (Optional[Union[google.cloud.logging_v2.types.ListExclusionsRequest, dict]]): - The request object. The parameters to ``ListExclusions``. + The request object. The parameters to `ListExclusions`. parent (:class:`str`): - Required. The parent resource whose exclusions are to be - listed. - - :: - + Required. The parent resource whose + exclusions are to be listed. "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -2715,10 +2721,11 @@ async def sample_list_exclusions(): Returns: google.cloud.logging_v2.services.config_service_v2.pagers.ListExclusionsAsyncPager: - Result returned from ListExclusions. - - Iterating over this object will yield results and - resolve additional pages automatically. + Result returned from + `ListExclusions`. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -2785,7 +2792,8 @@ async def _get_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Gets the description of an exclusion in the \_Default sink. + r"""Gets the description of an exclusion in the _Default + sink. .. code-block:: python @@ -2815,20 +2823,18 @@ async def sample_get_exclusion(): Args: request (Optional[Union[google.cloud.logging_v2.types.GetExclusionRequest, dict]]): - The request object. The parameters to ``GetExclusion``. + The request object. The parameters to `GetExclusion`. name (:class:`str`): - Required. The resource name of an existing exclusion: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of an + existing exclusion: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -2843,13 +2849,16 @@ async def sample_get_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -2906,9 +2915,10 @@ async def _create_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Creates a new exclusion in the \_Default sink in a specified - parent resource. Only log entries belonging to that resource can - be excluded. You can have up to 10 exclusions in a resource. + r"""Creates a new exclusion in the _Default sink in a + specified parent resource. Only log entries belonging to + that resource can be excluded. You can have up to 10 + exclusions in a resource. .. code-block:: python @@ -2943,29 +2953,27 @@ async def sample_create_exclusion(): Args: request (Optional[Union[google.cloud.logging_v2.types.CreateExclusionRequest, dict]]): - The request object. The parameters to ``CreateExclusion``. + The request object. The parameters to `CreateExclusion`. parent (:class:`str`): - Required. The parent resource in which to create the - exclusion: - - :: - + Required. The parent resource in + which to create the exclusion: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" For examples: - ``"projects/my-logging-project"`` - ``"organizations/123456789"`` + `"projects/my-logging-project"` + `"organizations/123456789"` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. exclusion (:class:`google.cloud.logging_v2.types.LogExclusion`): - Required. The new exclusion, whose ``name`` parameter is - an exclusion name that is not already used in the parent + Required. The new exclusion, whose + `name` parameter is an exclusion name + that is not already used in the parent resource. This corresponds to the ``exclusion`` field @@ -2981,13 +2989,16 @@ async def sample_create_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -3047,8 +3058,8 @@ async def _update_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Changes one or more properties of an existing exclusion in the - \_Default sink. + r"""Changes one or more properties of an existing + exclusion in the _Default sink. .. code-block:: python @@ -3083,42 +3094,43 @@ async def sample_update_exclusion(): Args: request (Optional[Union[google.cloud.logging_v2.types.UpdateExclusionRequest, dict]]): - The request object. The parameters to ``UpdateExclusion``. + The request object. The parameters to `UpdateExclusion`. name (:class:`str`): - Required. The resource name of the exclusion to update: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of the + exclusion to update: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. exclusion (:class:`google.cloud.logging_v2.types.LogExclusion`): - Required. New values for the existing exclusion. Only - the fields specified in ``update_mask`` are relevant. + Required. New values for the existing + exclusion. Only the fields specified in + `update_mask` are relevant. This corresponds to the ``exclusion`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Required. A non-empty list of fields to change in the - existing exclusion. New values for the fields are taken - from the corresponding fields in the - [LogExclusion][google.logging.v2.LogExclusion] included - in this request. Fields not mentioned in ``update_mask`` - are not changed and are ignored in the request. - - For example, to change the filter and description of an - exclusion, specify an ``update_mask`` of - ``"filter,description"``. + Required. A non-empty list of fields + to change in the existing exclusion. New + values for the fields are taken from the + corresponding fields in the + [LogExclusion][google.logging.v2.LogExclusion] + included in this request. Fields not + mentioned in `update_mask` are not + changed and are ignored in the request. + + For example, to change the filter and + description of an exclusion, specify an + `update_mask` of `"filter,description"`. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -3133,13 +3145,16 @@ async def sample_update_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -3199,7 +3214,7 @@ async def _delete_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes an exclusion in the \_Default sink. + r"""Deletes an exclusion in the _Default sink. .. code-block:: python @@ -3226,21 +3241,18 @@ async def sample_delete_exclusion(): Args: request (Optional[Union[google.cloud.logging_v2.types.DeleteExclusionRequest, dict]]): - The request object. The parameters to ``DeleteExclusion``. + The request object. The parameters to `DeleteExclusion`. name (:class:`str`): - Required. The resource name of an existing exclusion to - delete: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of an + existing exclusion to delete: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -3302,15 +3314,16 @@ async def _get_cmek_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.CmekSettings: - r"""Gets the Logging CMEK settings for the given resource. - - Note: CMEK for the Log Router can be configured for Google Cloud - projects, folders, organizations and billing accounts. Once - configured for an organization, it applies to all projects and - folders in the Google Cloud organization. - - See `Enabling CMEK for Log - Router `__ + r"""Gets the Logging CMEK settings for the given + resource. + Note: CMEK for the Log Router can be configured for + Google Cloud projects, folders, organizations and + billing accounts. Once configured for an organization, + it applies to all projects and folders in the Google + Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3344,8 +3357,8 @@ async def sample_get_cmek_settings(): The request object. The parameters to [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -3357,18 +3370,21 @@ async def sample_get_cmek_settings(): Returns: google.cloud.logging_v2.types.CmekSettings: - Describes the customer-managed encryption key (CMEK) settings associated with - a project, folder, organization, billing account, or - flexible resource. - - Note: CMEK for the Log Router can currently only be - configured for Google Cloud organizations. Once - configured, it applies to all projects and folders in - the Google Cloud organization. - - See [Enabling CMEK for Log - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Describes the customer-managed + encryption key (CMEK) settings + associated with a project, folder, + organization, billing account, or + flexible resource. + + Note: CMEK for the Log Router can + currently only be configured for Google + Cloud organizations. Once configured, it + applies to all projects and folders in + the Google Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ # Create or coerce a protobuf request object. @@ -3410,20 +3426,22 @@ async def _update_cmek_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.CmekSettings: - r"""Updates the Log Router CMEK settings for the given resource. - - Note: CMEK for the Log Router can currently only be configured - for Google Cloud organizations. Once configured, it applies to - all projects and folders in the Google Cloud organization. + r"""Updates the Log Router CMEK settings for the given + resource. + Note: CMEK for the Log Router can currently only be + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3457,8 +3475,8 @@ async def sample_update_cmek_settings(): The request object. The parameters to [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. @@ -3470,18 +3488,21 @@ async def sample_update_cmek_settings(): Returns: google.cloud.logging_v2.types.CmekSettings: - Describes the customer-managed encryption key (CMEK) settings associated with - a project, folder, organization, billing account, or - flexible resource. - - Note: CMEK for the Log Router can currently only be - configured for Google Cloud organizations. Once - configured, it applies to all projects and folders in - the Google Cloud organization. - - See [Enabling CMEK for Log - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Describes the customer-managed + encryption key (CMEK) settings + associated with a project, folder, + organization, billing account, or + flexible resource. + + Note: CMEK for the Log Router can + currently only be configured for Google + Cloud organizations. Once configured, it + applies to all projects and folders in + the Google Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ # Create or coerce a protobuf request object. @@ -3526,14 +3547,15 @@ async def _get_settings(self, ) -> logging_config.Settings: r"""Gets the Log Router settings for the given resource. - Note: Settings for the Log Router can be get for Google Cloud - projects, folders, organizations and billing accounts. Currently - it can only be configured for organizations. Once configured for - an organization, it applies to all projects and folders in the - Google Cloud organization. + Note: Settings for the Log Router can be get for Google + Cloud projects, folders, organizations and billing + accounts. Currently it can only be configured for + organizations. Once configured for an organization, it + applies to all projects and folders in the Google Cloud + organization. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3567,28 +3589,28 @@ async def sample_get_settings(): The request object. The parameters to [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. name (:class:`str`): - Required. The resource for which to retrieve settings. - - :: - + Required. The resource for which to + retrieve settings. "projects/[PROJECT_ID]/settings" - "organizations/[ORGANIZATION_ID]/settings" - "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - "folders/[FOLDER_ID]/settings" + "organizations/[ORGANIZATION_ID]/settings" + "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + "folders/[FOLDER_ID]/settings" For example: - ``"organizations/12345/settings"`` + `"organizations/12345/settings"` - Note: Settings for the Log Router can be get for Google - Cloud projects, folders, organizations and billing - accounts. Currently it can only be configured for - organizations. Once configured for an organization, it - applies to all projects and folders in the Google Cloud + Note: Settings for the Log Router can be + get for Google Cloud projects, folders, + organizations and billing accounts. + Currently it can only be configured for + organizations. Once configured for an + organization, it applies to all projects + and folders in the Google Cloud organization. This corresponds to the ``name`` field @@ -3663,23 +3685,23 @@ async def _update_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.Settings: - r"""Updates the Log Router settings for the given resource. - + r"""Updates the Log Router settings for the given + resource. Note: Settings for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, it - applies to all projects and folders in the Google Cloud - organization. + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. 4) ``location_id`` - is not supported by Logging. 5) ``location_id`` violate - OrgPolicy. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. 4) `location_id` is not supported by Logging. + 5) `location_id` violate OrgPolicy. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3713,29 +3735,31 @@ async def sample_update_settings(): The request object. The parameters to [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. settings (:class:`google.cloud.logging_v2.types.Settings`): Required. The settings to update. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. This corresponds to the ``settings`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Optional. Field mask identifying which fields from - ``settings`` should be updated. A field will be - overwritten if and only if it is in the update mask. + Optional. Field mask identifying + which fields from `settings` should be + updated. A field will be overwritten if + and only if it is in the update mask. Output only fields cannot be updated. - See [FieldMask][google.protobuf.FieldMask] for more - information. + See + [FieldMask][google.protobuf.FieldMask] + for more information. - For example: ``"updateMask=kmsKeyName"`` + For example: `"updateMask=kmsKeyName"` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -3856,12 +3880,13 @@ async def sample_copy_log_entries(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.CopyLogEntriesResponse` - Response type for CopyLogEntries long running - operations. + Response type for CopyLogEntries long + running operations. """ # Create or coerce a protobuf request object. diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/client.py index 696ac4be7c..17dadeab0a 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/client.py @@ -705,20 +705,18 @@ def sample_list_buckets(): Args: request (Union[google.cloud.logging_v2.types.ListBucketsRequest, dict]): - The request object. The parameters to ``ListBuckets``. + The request object. The parameters to `ListBuckets`. parent (str): - Required. The parent resource whose buckets are to be - listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - - Note: The locations portion of the resource must be - specified, but supplying the character ``-`` in place of + Required. The parent resource whose + buckets are to be listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + + Note: The locations portion of the + resource must be specified, but + supplying the character `-` in place of [LOCATION_ID] will return all buckets. This corresponds to the ``parent`` field @@ -833,7 +831,7 @@ def sample_get_bucket(): Args: request (Union[google.cloud.logging_v2.types.GetBucketRequest, dict]): - The request object. The parameters to ``GetBucket``. + The request object. The parameters to `GetBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -925,7 +923,7 @@ def sample_create_bucket_async(): Args: request (Union[google.cloud.logging_v2.types.CreateBucketRequest, dict]): - The request object. The parameters to ``CreateBucket``. + The request object. The parameters to `CreateBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -936,11 +934,13 @@ def sample_create_bucket_async(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.LogBucket` - Describes a repository in which log entries are stored. + Describes a repository in which log + entries are stored. """ # Create or coerce a protobuf request object. @@ -992,11 +992,12 @@ def update_bucket_async(self, ) -> operation.Operation: r"""Updates a log bucket asynchronously. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. .. code-block:: python @@ -1030,7 +1031,7 @@ def sample_update_bucket_async(): Args: request (Union[google.cloud.logging_v2.types.UpdateBucketRequest, dict]): - The request object. The parameters to ``UpdateBucket``. + The request object. The parameters to `UpdateBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1041,11 +1042,13 @@ def sample_update_bucket_async(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.LogBucket` - Describes a repository in which log entries are stored. + Describes a repository in which log + entries are stored. """ # Create or coerce a protobuf request object. @@ -1128,7 +1131,7 @@ def sample_create_bucket(): Args: request (Union[google.cloud.logging_v2.types.CreateBucketRequest, dict]): - The request object. The parameters to ``CreateBucket``. + The request object. The parameters to `CreateBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1184,11 +1187,12 @@ def update_bucket(self, ) -> logging_config.LogBucket: r"""Updates a log bucket. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. .. code-block:: python @@ -1218,7 +1222,7 @@ def sample_update_bucket(): Args: request (Union[google.cloud.logging_v2.types.UpdateBucketRequest, dict]): - The request object. The parameters to ``UpdateBucket``. + The request object. The parameters to `UpdateBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1274,10 +1278,10 @@ def delete_bucket(self, ) -> None: r"""Deletes a log bucket. - Changes the bucket's ``lifecycle_state`` to the - ``DELETE_REQUESTED`` state. After 7 days, the bucket will be - purged and all log entries in the bucket will be permanently - deleted. + Changes the bucket's `lifecycle_state` to the + `DELETE_REQUESTED` state. After 7 days, the bucket will + be purged and all log entries in the bucket will be + permanently deleted. .. code-block:: python @@ -1304,7 +1308,7 @@ def sample_delete_bucket(): Args: request (Union[google.cloud.logging_v2.types.DeleteBucketRequest, dict]): - The request object. The parameters to ``DeleteBucket``. + The request object. The parameters to `DeleteBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1378,7 +1382,7 @@ def sample_undelete_bucket(): Args: request (Union[google.cloud.logging_v2.types.UndeleteBucketRequest, dict]): - The request object. The parameters to ``UndeleteBucket``. + The request object. The parameters to `UndeleteBucket`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1455,13 +1459,11 @@ def sample_list_views(): Args: request (Union[google.cloud.logging_v2.types.ListViewsRequest, dict]): - The request object. The parameters to ``ListViews``. + The request object. The parameters to `ListViews`. parent (str): - Required. The bucket whose views are to be listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The bucket whose views are + to be listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1575,7 +1577,7 @@ def sample_get_view(): Args: request (Union[google.cloud.logging_v2.types.GetViewRequest, dict]): - The request object. The parameters to ``GetView``. + The request object. The parameters to `GetView`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1661,7 +1663,7 @@ def sample_create_view(): Args: request (Union[google.cloud.logging_v2.types.CreateViewRequest, dict]): - The request object. The parameters to ``CreateView``. + The request object. The parameters to `CreateView`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1715,11 +1717,12 @@ def _update_view(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogView: - r"""Updates a view on a log bucket. This method replaces the - following fields in the existing view with values from the new - view: ``filter``. If an ``UNAVAILABLE`` error is returned, this - indicates that system is not in a state where it can update the - view. If this occurs, please try again in a few minutes. + r"""Updates a view on a log bucket. This method replaces + the following fields in the existing view with values + from the new view: `filter`. If an `UNAVAILABLE` error + is returned, this indicates that system is not in a + state where it can update the view. If this occurs, + please try again in a few minutes. .. code-block:: python @@ -1749,7 +1752,7 @@ def sample_update_view(): Args: request (Union[google.cloud.logging_v2.types.UpdateViewRequest, dict]): - The request object. The parameters to ``UpdateView``. + The request object. The parameters to `UpdateView`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1803,10 +1806,10 @@ def _delete_view(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a view on a log bucket. If an ``UNAVAILABLE`` error is - returned, this indicates that system is not in a state where it - can delete the view. If this occurs, please try again in a few - minutes. + r"""Deletes a view on a log bucket. + If an `UNAVAILABLE` error is returned, this indicates + that system is not in a state where it can delete the + view. If this occurs, please try again in a few minutes. .. code-block:: python @@ -1833,7 +1836,7 @@ def sample_delete_view(): Args: request (Union[google.cloud.logging_v2.types.DeleteViewRequest, dict]): - The request object. The parameters to ``DeleteView``. + The request object. The parameters to `DeleteView`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1910,17 +1913,14 @@ def sample_list_sinks(): Args: request (Union[google.cloud.logging_v2.types.ListSinksRequest, dict]): - The request object. The parameters to ``ListSinks``. + The request object. The parameters to `ListSinks`. parent (str): - Required. The parent resource whose sinks are to be - listed: - - :: - + Required. The parent resource whose + sinks are to be listed: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1935,10 +1935,11 @@ def sample_list_sinks(): Returns: google.cloud.logging_v2.services.config_service_v2.pagers.ListSinksPager: - Result returned from ListSinks. + Result returned from `ListSinks`. - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -2034,20 +2035,18 @@ def sample_get_sink(): Args: request (Union[google.cloud.logging_v2.types.GetSinkRequest, dict]): - The request object. The parameters to ``GetSink``. + The request object. The parameters to `GetSink`. sink_name (str): - Required. The resource name of the sink: - - :: - - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + Required. The resource name of the + sink: + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -2126,11 +2125,12 @@ def _create_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogSink: - r"""Creates a sink that exports specified log entries to a - destination. The export of newly-ingested log entries begins - immediately, unless the sink's ``writer_identity`` is not - permitted to write to the destination. A sink can export log - entries only from the resource owning the sink. + r"""Creates a sink that exports specified log entries to + a destination. The export of newly-ingested log entries + begins immediately, unless the sink's `writer_identity` + is not permitted to write to the destination. A sink can + export log entries only from the resource owning the + sink. .. code-block:: python @@ -2165,27 +2165,27 @@ def sample_create_sink(): Args: request (Union[google.cloud.logging_v2.types.CreateSinkRequest, dict]): - The request object. The parameters to ``CreateSink``. + The request object. The parameters to `CreateSink`. parent (str): - Required. The resource in which to create the sink: - - :: - + Required. The resource in which to + create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" For examples: - ``"projects/my-project"`` ``"organizations/123456789"`` + `"projects/my-project"` + `"organizations/123456789"` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. sink (google.cloud.logging_v2.types.LogSink): - Required. The new sink, whose ``name`` parameter is a - sink identifier that is not already in use. + Required. The new sink, whose `name` + parameter is a sink identifier that is + not already in use. This corresponds to the ``sink`` field on the ``request`` instance; if ``request`` is provided, this @@ -2267,12 +2267,13 @@ def _update_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogSink: - r"""Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, - and ``filter``. + r"""Updates a sink. This method replaces the following + fields in the existing sink with values from the new + sink: `destination`, and `filter`. - The updated sink might also have a new ``writer_identity``; see - the ``unique_writer_identity`` field. + The updated sink might also have a new + `writer_identity`; see the `unique_writer_identity` + field. .. code-block:: python @@ -2307,50 +2308,55 @@ def sample_update_sink(): Args: request (Union[google.cloud.logging_v2.types.UpdateSinkRequest, dict]): - The request object. The parameters to ``UpdateSink``. + The request object. The parameters to `UpdateSink`. sink_name (str): - Required. The full resource name of the sink to update, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of + the sink to update, including the parent + resource and the sink identifier: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. sink (google.cloud.logging_v2.types.LogSink): - Required. The updated sink, whose name is the same - identifier that appears as part of ``sink_name``. + Required. The updated sink, whose + name is the same identifier that appears + as part of `sink_name`. This corresponds to the ``sink`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask that specifies the fields in - ``sink`` that need an update. A sink field will be - overwritten if, and only if, it is in the update mask. - ``name`` and output only fields cannot be updated. + Optional. Field mask that specifies + the fields in `sink` that need an + update. A sink field will be overwritten + if, and only if, it is in the update + mask. `name` and output only fields + cannot be updated. - An empty ``updateMask`` is temporarily treated as using - the following mask for backwards compatibility purposes: + An empty `updateMask` is temporarily + treated as using the following mask for + backwards compatibility purposes: - ``destination,filter,includeChildren`` + `destination,filter,includeChildren` - At some point in the future, behavior will be removed - and specifying an empty ``updateMask`` will be an error. + At some point in the future, behavior + will be removed and specifying an empty + `updateMask` will be an error. - For a detailed ``FieldMask`` definition, see + For a detailed `FieldMask` definition, + see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - For example: ``updateMask=filter`` + For example: `updateMask=filter` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -2432,8 +2438,9 @@ def _delete_sink(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes a sink. If the sink has a unique ``writer_identity``, - then that service account is also deleted. + r"""Deletes a sink. If the sink has a unique + `writer_identity`, then that service account is also + deleted. .. code-block:: python @@ -2460,21 +2467,20 @@ def sample_delete_sink(): Args: request (Union[google.cloud.logging_v2.types.DeleteSinkRequest, dict]): - The request object. The parameters to ``DeleteSink``. + The request object. The parameters to `DeleteSink`. sink_name (str): - Required. The full resource name of the sink to delete, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of + the sink to delete, including the parent + resource and the sink identifier: - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` This corresponds to the ``sink_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -2578,15 +2584,12 @@ def sample_create_link(): request (Union[google.cloud.logging_v2.types.CreateLinkRequest, dict]): The request object. The parameters to CreateLink. parent (str): - Required. The full resource name of the bucket to create - a link for. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The full resource name of + the bucket to create a link for. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -2597,9 +2600,11 @@ def sample_create_link(): on the ``request`` instance; if ``request`` is provided, this should not be set. link_id (str): - Required. The ID to use for the link. The link_id can - have up to 100 characters. A valid link_id must only - have alphanumeric characters and underscores within it. + Required. The ID to use for the link. + The link_id can have up to 100 + characters. A valid link_id must only + have alphanumeric characters and + underscores within it. This corresponds to the ``link_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -2614,11 +2619,13 @@ def sample_create_link(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.logging_v2.types.Link` Describes a - link connected to an analytics enabled bucket. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.logging_v2.types.Link` + Describes a link connected to an + analytics enabled bucket. """ # Create or coerce a protobuf request object. @@ -2722,8 +2729,8 @@ def sample_delete_link(): request (Union[google.cloud.logging_v2.types.DeleteLinkRequest, dict]): The request object. The parameters to DeleteLink. name (str): - Required. The full resource name of the link to delete. - + Required. The full resource name of + the link to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" @@ -2742,18 +2749,21 @@ def sample_delete_link(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -2849,9 +2859,8 @@ def sample_list_links(): request (Union[google.cloud.logging_v2.types.ListLinksRequest, dict]): The request object. The parameters to ListLinks. parent (str): - Required. The parent resource whose links are to be - listed: - + Required. The parent resource whose + links are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" @@ -2972,8 +2981,8 @@ def sample_get_link(): request (Union[google.cloud.logging_v2.types.GetLinkRequest, dict]): The request object. The parameters to GetLink. name (str): - Required. The resource name of the link: - + Required. The resource name of the + link: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" @@ -3048,8 +3057,8 @@ def _list_exclusions(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListExclusionsPager: - r"""Lists all the exclusions on the \_Default sink in a parent - resource. + r"""Lists all the exclusions on the _Default sink in a + parent resource. .. code-block:: python @@ -3080,17 +3089,14 @@ def sample_list_exclusions(): Args: request (Union[google.cloud.logging_v2.types.ListExclusionsRequest, dict]): - The request object. The parameters to ``ListExclusions``. + The request object. The parameters to `ListExclusions`. parent (str): - Required. The parent resource whose exclusions are to be - listed. - - :: - + Required. The parent resource whose + exclusions are to be listed. "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -3105,10 +3111,11 @@ def sample_list_exclusions(): Returns: google.cloud.logging_v2.services.config_service_v2.pagers.ListExclusionsPager: - Result returned from ListExclusions. - - Iterating over this object will yield results and - resolve additional pages automatically. + Result returned from + `ListExclusions`. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -3174,7 +3181,8 @@ def _get_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Gets the description of an exclusion in the \_Default sink. + r"""Gets the description of an exclusion in the _Default + sink. .. code-block:: python @@ -3204,20 +3212,18 @@ def sample_get_exclusion(): Args: request (Union[google.cloud.logging_v2.types.GetExclusionRequest, dict]): - The request object. The parameters to ``GetExclusion``. + The request object. The parameters to `GetExclusion`. name (str): - Required. The resource name of an existing exclusion: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of an + existing exclusion: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -3232,13 +3238,16 @@ def sample_get_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -3294,9 +3303,10 @@ def _create_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Creates a new exclusion in the \_Default sink in a specified - parent resource. Only log entries belonging to that resource can - be excluded. You can have up to 10 exclusions in a resource. + r"""Creates a new exclusion in the _Default sink in a + specified parent resource. Only log entries belonging to + that resource can be excluded. You can have up to 10 + exclusions in a resource. .. code-block:: python @@ -3331,29 +3341,27 @@ def sample_create_exclusion(): Args: request (Union[google.cloud.logging_v2.types.CreateExclusionRequest, dict]): - The request object. The parameters to ``CreateExclusion``. + The request object. The parameters to `CreateExclusion`. parent (str): - Required. The parent resource in which to create the - exclusion: - - :: - + Required. The parent resource in + which to create the exclusion: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]" - "folders/[FOLDER_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]" + "folders/[FOLDER_ID]" For examples: - ``"projects/my-logging-project"`` - ``"organizations/123456789"`` + `"projects/my-logging-project"` + `"organizations/123456789"` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. exclusion (google.cloud.logging_v2.types.LogExclusion): - Required. The new exclusion, whose ``name`` parameter is - an exclusion name that is not already used in the parent + Required. The new exclusion, whose + `name` parameter is an exclusion name + that is not already used in the parent resource. This corresponds to the ``exclusion`` field @@ -3369,13 +3377,16 @@ def sample_create_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -3434,8 +3445,8 @@ def _update_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.LogExclusion: - r"""Changes one or more properties of an existing exclusion in the - \_Default sink. + r"""Changes one or more properties of an existing + exclusion in the _Default sink. .. code-block:: python @@ -3470,42 +3481,43 @@ def sample_update_exclusion(): Args: request (Union[google.cloud.logging_v2.types.UpdateExclusionRequest, dict]): - The request object. The parameters to ``UpdateExclusion``. + The request object. The parameters to `UpdateExclusion`. name (str): - Required. The resource name of the exclusion to update: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of the + exclusion to update: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. exclusion (google.cloud.logging_v2.types.LogExclusion): - Required. New values for the existing exclusion. Only - the fields specified in ``update_mask`` are relevant. + Required. New values for the existing + exclusion. Only the fields specified in + `update_mask` are relevant. This corresponds to the ``exclusion`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Required. A non-empty list of fields to change in the - existing exclusion. New values for the fields are taken - from the corresponding fields in the - [LogExclusion][google.logging.v2.LogExclusion] included - in this request. Fields not mentioned in ``update_mask`` - are not changed and are ignored in the request. - - For example, to change the filter and description of an - exclusion, specify an ``update_mask`` of - ``"filter,description"``. + Required. A non-empty list of fields + to change in the existing exclusion. New + values for the fields are taken from the + corresponding fields in the + [LogExclusion][google.logging.v2.LogExclusion] + included in this request. Fields not + mentioned in `update_mask` are not + changed and are ignored in the request. + + For example, to change the filter and + description of an exclusion, specify an + `update_mask` of `"filter,description"`. This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -3520,13 +3532,16 @@ def sample_update_exclusion(): Returns: google.cloud.logging_v2.types.LogExclusion: - Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of - log entries, you can use exclusions to reduce your - chargeable logs. Note that exclusions on - organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify - the Required sink or exclude logs from it. + Specifies a set of log entries that + are filtered out by a sink. If your + Google Cloud resource receives a large + volume of log entries, you can use + exclusions to reduce your chargeable + logs. Note that exclusions on + organization-level and folder-level + sinks don't apply to child resources. + Note also that you cannot modify the + _Required sink or exclude logs from it. """ # Create or coerce a protobuf request object. @@ -3585,7 +3600,7 @@ def _delete_exclusion(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes an exclusion in the \_Default sink. + r"""Deletes an exclusion in the _Default sink. .. code-block:: python @@ -3612,21 +3627,18 @@ def sample_delete_exclusion(): Args: request (Union[google.cloud.logging_v2.types.DeleteExclusionRequest, dict]): - The request object. The parameters to ``DeleteExclusion``. + The request object. The parameters to `DeleteExclusion`. name (str): - Required. The resource name of an existing exclusion to - delete: - - :: - - "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + Required. The resource name of an + existing exclusion to delete: + "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For example: - ``"projects/my-project/exclusions/my-exclusion"`` + `"projects/my-project/exclusions/my-exclusion"` This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -3687,15 +3699,16 @@ def _get_cmek_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.CmekSettings: - r"""Gets the Logging CMEK settings for the given resource. - - Note: CMEK for the Log Router can be configured for Google Cloud - projects, folders, organizations and billing accounts. Once - configured for an organization, it applies to all projects and - folders in the Google Cloud organization. - - See `Enabling CMEK for Log - Router `__ + r"""Gets the Logging CMEK settings for the given + resource. + Note: CMEK for the Log Router can be configured for + Google Cloud projects, folders, organizations and + billing accounts. Once configured for an organization, + it applies to all projects and folders in the Google + Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3729,8 +3742,8 @@ def sample_get_cmek_settings(): The request object. The parameters to [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3742,18 +3755,21 @@ def sample_get_cmek_settings(): Returns: google.cloud.logging_v2.types.CmekSettings: - Describes the customer-managed encryption key (CMEK) settings associated with - a project, folder, organization, billing account, or - flexible resource. - - Note: CMEK for the Log Router can currently only be - configured for Google Cloud organizations. Once - configured, it applies to all projects and folders in - the Google Cloud organization. - - See [Enabling CMEK for Log - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Describes the customer-managed + encryption key (CMEK) settings + associated with a project, folder, + organization, billing account, or + flexible resource. + + Note: CMEK for the Log Router can + currently only be configured for Google + Cloud organizations. Once configured, it + applies to all projects and folders in + the Google Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ # Create or coerce a protobuf request object. @@ -3795,20 +3811,22 @@ def _update_cmek_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.CmekSettings: - r"""Updates the Log Router CMEK settings for the given resource. - - Note: CMEK for the Log Router can currently only be configured - for Google Cloud organizations. Once configured, it applies to - all projects and folders in the Google Cloud organization. + r"""Updates the Log Router CMEK settings for the given + resource. + Note: CMEK for the Log Router can currently only be + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3842,8 +3860,8 @@ def sample_update_cmek_settings(): The request object. The parameters to [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -3855,18 +3873,21 @@ def sample_update_cmek_settings(): Returns: google.cloud.logging_v2.types.CmekSettings: - Describes the customer-managed encryption key (CMEK) settings associated with - a project, folder, organization, billing account, or - flexible resource. - - Note: CMEK for the Log Router can currently only be - configured for Google Cloud organizations. Once - configured, it applies to all projects and folders in - the Google Cloud organization. - - See [Enabling CMEK for Log - Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - for more information. + Describes the customer-managed + encryption key (CMEK) settings + associated with a project, folder, + organization, billing account, or + flexible resource. + + Note: CMEK for the Log Router can + currently only be configured for Google + Cloud organizations. Once configured, it + applies to all projects and folders in + the Google Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + for more information. """ # Create or coerce a protobuf request object. @@ -3911,14 +3932,15 @@ def _get_settings(self, ) -> logging_config.Settings: r"""Gets the Log Router settings for the given resource. - Note: Settings for the Log Router can be get for Google Cloud - projects, folders, organizations and billing accounts. Currently - it can only be configured for organizations. Once configured for - an organization, it applies to all projects and folders in the - Google Cloud organization. + Note: Settings for the Log Router can be get for Google + Cloud projects, folders, organizations and billing + accounts. Currently it can only be configured for + organizations. Once configured for an organization, it + applies to all projects and folders in the Google Cloud + organization. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -3952,28 +3974,28 @@ def sample_get_settings(): The request object. The parameters to [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. name (str): - Required. The resource for which to retrieve settings. - - :: - + Required. The resource for which to + retrieve settings. "projects/[PROJECT_ID]/settings" - "organizations/[ORGANIZATION_ID]/settings" - "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - "folders/[FOLDER_ID]/settings" + "organizations/[ORGANIZATION_ID]/settings" + "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + "folders/[FOLDER_ID]/settings" For example: - ``"organizations/12345/settings"`` + `"organizations/12345/settings"` - Note: Settings for the Log Router can be get for Google - Cloud projects, folders, organizations and billing - accounts. Currently it can only be configured for - organizations. Once configured for an organization, it - applies to all projects and folders in the Google Cloud + Note: Settings for the Log Router can be + get for Google Cloud projects, folders, + organizations and billing accounts. + Currently it can only be configured for + organizations. Once configured for an + organization, it applies to all projects + and folders in the Google Cloud organization. This corresponds to the ``name`` field @@ -4047,23 +4069,23 @@ def _update_settings(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> logging_config.Settings: - r"""Updates the Log Router settings for the given resource. - + r"""Updates the Log Router settings for the given + resource. Note: Settings for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, it - applies to all projects and folders in the Google Cloud - organization. + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. 4) ``location_id`` - is not supported by Logging. 5) ``location_id`` violate - OrgPolicy. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. 4) `location_id` is not supported by Logging. + 5) `location_id` violate OrgPolicy. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. .. code-block:: python @@ -4097,29 +4119,31 @@ def sample_update_settings(): The request object. The parameters to [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. settings (google.cloud.logging_v2.types.Settings): Required. The settings to update. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. This corresponds to the ``settings`` field on the ``request`` instance; if ``request`` is provided, this should not be set. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask identifying which fields from - ``settings`` should be updated. A field will be - overwritten if and only if it is in the update mask. + Optional. Field mask identifying + which fields from `settings` should be + updated. A field will be overwritten if + and only if it is in the update mask. Output only fields cannot be updated. - See [FieldMask][google.protobuf.FieldMask] for more - information. + See + [FieldMask][google.protobuf.FieldMask] + for more information. - For example: ``"updateMask=kmsKeyName"`` + For example: `"updateMask=kmsKeyName"` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this @@ -4239,12 +4263,13 @@ def sample_copy_log_entries(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be + An object representing a long-running + operation. + The result type for the operation will + be :class:`google.cloud.logging_v2.types.CopyLogEntriesResponse` - Response type for CopyLogEntries long running - operations. + Response type for CopyLogEntries long + running operations. """ # Create or coerce a protobuf request object. diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py index ac3a4393a8..e820e07dca 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py @@ -418,11 +418,12 @@ def update_bucket_async(self) -> Callable[ Updates a log bucket asynchronously. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. Returns: Callable[[~.UpdateBucketRequest], @@ -478,11 +479,12 @@ def update_bucket(self) -> Callable[ Updates a log bucket. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. Returns: Callable[[~.UpdateBucketRequest], @@ -510,10 +512,10 @@ def delete_bucket(self) -> Callable[ Deletes a log bucket. - Changes the bucket's ``lifecycle_state`` to the - ``DELETE_REQUESTED`` state. After 7 days, the bucket will be - purged and all log entries in the bucket will be permanently - deleted. + Changes the bucket's `lifecycle_state` to the + `DELETE_REQUESTED` state. After 7 days, the bucket will + be purged and all log entries in the bucket will be + permanently deleted. Returns: Callable[[~.DeleteBucketRequest], @@ -646,11 +648,12 @@ def update_view(self) -> Callable[ logging_config.LogView]: r"""Return a callable for the update view method over gRPC. - Updates a view on a log bucket. This method replaces the - following fields in the existing view with values from the new - view: ``filter``. If an ``UNAVAILABLE`` error is returned, this - indicates that system is not in a state where it can update the - view. If this occurs, please try again in a few minutes. + Updates a view on a log bucket. This method replaces + the following fields in the existing view with values + from the new view: `filter`. If an `UNAVAILABLE` error + is returned, this indicates that system is not in a + state where it can update the view. If this occurs, + please try again in a few minutes. Returns: Callable[[~.UpdateViewRequest], @@ -676,10 +679,10 @@ def delete_view(self) -> Callable[ empty_pb2.Empty]: r"""Return a callable for the delete view method over gRPC. - Deletes a view on a log bucket. If an ``UNAVAILABLE`` error is - returned, this indicates that system is not in a state where it - can delete the view. If this occurs, please try again in a few - minutes. + Deletes a view on a log bucket. + If an `UNAVAILABLE` error is returned, this indicates + that system is not in a state where it can delete the + view. If this occurs, please try again in a few minutes. Returns: Callable[[~.DeleteViewRequest], @@ -757,11 +760,12 @@ def create_sink(self) -> Callable[ logging_config.LogSink]: r"""Return a callable for the create sink method over gRPC. - Creates a sink that exports specified log entries to a - destination. The export of newly-ingested log entries begins - immediately, unless the sink's ``writer_identity`` is not - permitted to write to the destination. A sink can export log - entries only from the resource owning the sink. + Creates a sink that exports specified log entries to + a destination. The export of newly-ingested log entries + begins immediately, unless the sink's `writer_identity` + is not permitted to write to the destination. A sink can + export log entries only from the resource owning the + sink. Returns: Callable[[~.CreateSinkRequest], @@ -787,12 +791,13 @@ def update_sink(self) -> Callable[ logging_config.LogSink]: r"""Return a callable for the update sink method over gRPC. - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, - and ``filter``. + Updates a sink. This method replaces the following + fields in the existing sink with values from the new + sink: `destination`, and `filter`. - The updated sink might also have a new ``writer_identity``; see - the ``unique_writer_identity`` field. + The updated sink might also have a new + `writer_identity`; see the `unique_writer_identity` + field. Returns: Callable[[~.UpdateSinkRequest], @@ -818,8 +823,9 @@ def delete_sink(self) -> Callable[ empty_pb2.Empty]: r"""Return a callable for the delete sink method over gRPC. - Deletes a sink. If the sink has a unique ``writer_identity``, - then that service account is also deleted. + Deletes a sink. If the sink has a unique + `writer_identity`, then that service account is also + deleted. Returns: Callable[[~.DeleteSinkRequest], @@ -953,8 +959,8 @@ def list_exclusions(self) -> Callable[ logging_config.ListExclusionsResponse]: r"""Return a callable for the list exclusions method over gRPC. - Lists all the exclusions on the \_Default sink in a parent - resource. + Lists all the exclusions on the _Default sink in a + parent resource. Returns: Callable[[~.ListExclusionsRequest], @@ -980,7 +986,8 @@ def get_exclusion(self) -> Callable[ logging_config.LogExclusion]: r"""Return a callable for the get exclusion method over gRPC. - Gets the description of an exclusion in the \_Default sink. + Gets the description of an exclusion in the _Default + sink. Returns: Callable[[~.GetExclusionRequest], @@ -1006,9 +1013,10 @@ def create_exclusion(self) -> Callable[ logging_config.LogExclusion]: r"""Return a callable for the create exclusion method over gRPC. - Creates a new exclusion in the \_Default sink in a specified - parent resource. Only log entries belonging to that resource can - be excluded. You can have up to 10 exclusions in a resource. + Creates a new exclusion in the _Default sink in a + specified parent resource. Only log entries belonging to + that resource can be excluded. You can have up to 10 + exclusions in a resource. Returns: Callable[[~.CreateExclusionRequest], @@ -1034,8 +1042,8 @@ def update_exclusion(self) -> Callable[ logging_config.LogExclusion]: r"""Return a callable for the update exclusion method over gRPC. - Changes one or more properties of an existing exclusion in the - \_Default sink. + Changes one or more properties of an existing + exclusion in the _Default sink. Returns: Callable[[~.UpdateExclusionRequest], @@ -1061,7 +1069,7 @@ def delete_exclusion(self) -> Callable[ empty_pb2.Empty]: r"""Return a callable for the delete exclusion method over gRPC. - Deletes an exclusion in the \_Default sink. + Deletes an exclusion in the _Default sink. Returns: Callable[[~.DeleteExclusionRequest], @@ -1087,15 +1095,16 @@ def get_cmek_settings(self) -> Callable[ logging_config.CmekSettings]: r"""Return a callable for the get cmek settings method over gRPC. - Gets the Logging CMEK settings for the given resource. - - Note: CMEK for the Log Router can be configured for Google Cloud - projects, folders, organizations and billing accounts. Once - configured for an organization, it applies to all projects and - folders in the Google Cloud organization. - - See `Enabling CMEK for Log - Router `__ + Gets the Logging CMEK settings for the given + resource. + Note: CMEK for the Log Router can be configured for + Google Cloud projects, folders, organizations and + billing accounts. Once configured for an organization, + it applies to all projects and folders in the Google + Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1122,20 +1131,22 @@ def update_cmek_settings(self) -> Callable[ logging_config.CmekSettings]: r"""Return a callable for the update cmek settings method over gRPC. - Updates the Log Router CMEK settings for the given resource. - - Note: CMEK for the Log Router can currently only be configured - for Google Cloud organizations. Once configured, it applies to - all projects and folders in the Google Cloud organization. + Updates the Log Router CMEK settings for the given + resource. + Note: CMEK for the Log Router can currently only be + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1164,14 +1175,15 @@ def get_settings(self) -> Callable[ Gets the Log Router settings for the given resource. - Note: Settings for the Log Router can be get for Google Cloud - projects, folders, organizations and billing accounts. Currently - it can only be configured for organizations. Once configured for - an organization, it applies to all projects and folders in the - Google Cloud organization. + Note: Settings for the Log Router can be get for Google + Cloud projects, folders, organizations and billing + accounts. Currently it can only be configured for + organizations. Once configured for an organization, it + applies to all projects and folders in the Google Cloud + organization. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1198,23 +1210,23 @@ def update_settings(self) -> Callable[ logging_config.Settings]: r"""Return a callable for the update settings method over gRPC. - Updates the Log Router settings for the given resource. - + Updates the Log Router settings for the given + resource. Note: Settings for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, it - applies to all projects and folders in the Google Cloud - organization. + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. 4) ``location_id`` - is not supported by Logging. 5) ``location_id`` violate - OrgPolicy. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. 4) `location_id` is not supported by Logging. + 5) `location_id` violate OrgPolicy. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py index fc7af0c06b..d7b5cd4bd7 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py @@ -424,11 +424,12 @@ def update_bucket_async(self) -> Callable[ Updates a log bucket asynchronously. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. Returns: Callable[[~.UpdateBucketRequest], @@ -484,11 +485,12 @@ def update_bucket(self) -> Callable[ Updates a log bucket. - If the bucket has a ``lifecycle_state`` of ``DELETE_REQUESTED``, - then ``FAILED_PRECONDITION`` will be returned. + If the bucket has a `lifecycle_state` of + `DELETE_REQUESTED`, then `FAILED_PRECONDITION` will be + returned. - After a bucket has been created, the bucket's location cannot be - changed. + After a bucket has been created, the bucket's location + cannot be changed. Returns: Callable[[~.UpdateBucketRequest], @@ -516,10 +518,10 @@ def delete_bucket(self) -> Callable[ Deletes a log bucket. - Changes the bucket's ``lifecycle_state`` to the - ``DELETE_REQUESTED`` state. After 7 days, the bucket will be - purged and all log entries in the bucket will be permanently - deleted. + Changes the bucket's `lifecycle_state` to the + `DELETE_REQUESTED` state. After 7 days, the bucket will + be purged and all log entries in the bucket will be + permanently deleted. Returns: Callable[[~.DeleteBucketRequest], @@ -652,11 +654,12 @@ def update_view(self) -> Callable[ Awaitable[logging_config.LogView]]: r"""Return a callable for the update view method over gRPC. - Updates a view on a log bucket. This method replaces the - following fields in the existing view with values from the new - view: ``filter``. If an ``UNAVAILABLE`` error is returned, this - indicates that system is not in a state where it can update the - view. If this occurs, please try again in a few minutes. + Updates a view on a log bucket. This method replaces + the following fields in the existing view with values + from the new view: `filter`. If an `UNAVAILABLE` error + is returned, this indicates that system is not in a + state where it can update the view. If this occurs, + please try again in a few minutes. Returns: Callable[[~.UpdateViewRequest], @@ -682,10 +685,10 @@ def delete_view(self) -> Callable[ Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete view method over gRPC. - Deletes a view on a log bucket. If an ``UNAVAILABLE`` error is - returned, this indicates that system is not in a state where it - can delete the view. If this occurs, please try again in a few - minutes. + Deletes a view on a log bucket. + If an `UNAVAILABLE` error is returned, this indicates + that system is not in a state where it can delete the + view. If this occurs, please try again in a few minutes. Returns: Callable[[~.DeleteViewRequest], @@ -763,11 +766,12 @@ def create_sink(self) -> Callable[ Awaitable[logging_config.LogSink]]: r"""Return a callable for the create sink method over gRPC. - Creates a sink that exports specified log entries to a - destination. The export of newly-ingested log entries begins - immediately, unless the sink's ``writer_identity`` is not - permitted to write to the destination. A sink can export log - entries only from the resource owning the sink. + Creates a sink that exports specified log entries to + a destination. The export of newly-ingested log entries + begins immediately, unless the sink's `writer_identity` + is not permitted to write to the destination. A sink can + export log entries only from the resource owning the + sink. Returns: Callable[[~.CreateSinkRequest], @@ -793,12 +797,13 @@ def update_sink(self) -> Callable[ Awaitable[logging_config.LogSink]]: r"""Return a callable for the update sink method over gRPC. - Updates a sink. This method replaces the following fields in the - existing sink with values from the new sink: ``destination``, - and ``filter``. + Updates a sink. This method replaces the following + fields in the existing sink with values from the new + sink: `destination`, and `filter`. - The updated sink might also have a new ``writer_identity``; see - the ``unique_writer_identity`` field. + The updated sink might also have a new + `writer_identity`; see the `unique_writer_identity` + field. Returns: Callable[[~.UpdateSinkRequest], @@ -824,8 +829,9 @@ def delete_sink(self) -> Callable[ Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete sink method over gRPC. - Deletes a sink. If the sink has a unique ``writer_identity``, - then that service account is also deleted. + Deletes a sink. If the sink has a unique + `writer_identity`, then that service account is also + deleted. Returns: Callable[[~.DeleteSinkRequest], @@ -959,8 +965,8 @@ def list_exclusions(self) -> Callable[ Awaitable[logging_config.ListExclusionsResponse]]: r"""Return a callable for the list exclusions method over gRPC. - Lists all the exclusions on the \_Default sink in a parent - resource. + Lists all the exclusions on the _Default sink in a + parent resource. Returns: Callable[[~.ListExclusionsRequest], @@ -986,7 +992,8 @@ def get_exclusion(self) -> Callable[ Awaitable[logging_config.LogExclusion]]: r"""Return a callable for the get exclusion method over gRPC. - Gets the description of an exclusion in the \_Default sink. + Gets the description of an exclusion in the _Default + sink. Returns: Callable[[~.GetExclusionRequest], @@ -1012,9 +1019,10 @@ def create_exclusion(self) -> Callable[ Awaitable[logging_config.LogExclusion]]: r"""Return a callable for the create exclusion method over gRPC. - Creates a new exclusion in the \_Default sink in a specified - parent resource. Only log entries belonging to that resource can - be excluded. You can have up to 10 exclusions in a resource. + Creates a new exclusion in the _Default sink in a + specified parent resource. Only log entries belonging to + that resource can be excluded. You can have up to 10 + exclusions in a resource. Returns: Callable[[~.CreateExclusionRequest], @@ -1040,8 +1048,8 @@ def update_exclusion(self) -> Callable[ Awaitable[logging_config.LogExclusion]]: r"""Return a callable for the update exclusion method over gRPC. - Changes one or more properties of an existing exclusion in the - \_Default sink. + Changes one or more properties of an existing + exclusion in the _Default sink. Returns: Callable[[~.UpdateExclusionRequest], @@ -1067,7 +1075,7 @@ def delete_exclusion(self) -> Callable[ Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete exclusion method over gRPC. - Deletes an exclusion in the \_Default sink. + Deletes an exclusion in the _Default sink. Returns: Callable[[~.DeleteExclusionRequest], @@ -1093,15 +1101,16 @@ def get_cmek_settings(self) -> Callable[ Awaitable[logging_config.CmekSettings]]: r"""Return a callable for the get cmek settings method over gRPC. - Gets the Logging CMEK settings for the given resource. - - Note: CMEK for the Log Router can be configured for Google Cloud - projects, folders, organizations and billing accounts. Once - configured for an organization, it applies to all projects and - folders in the Google Cloud organization. - - See `Enabling CMEK for Log - Router `__ + Gets the Logging CMEK settings for the given + resource. + Note: CMEK for the Log Router can be configured for + Google Cloud projects, folders, organizations and + billing accounts. Once configured for an organization, + it applies to all projects and folders in the Google + Cloud organization. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1128,20 +1137,22 @@ def update_cmek_settings(self) -> Callable[ Awaitable[logging_config.CmekSettings]]: r"""Return a callable for the update cmek settings method over gRPC. - Updates the Log Router CMEK settings for the given resource. - - Note: CMEK for the Log Router can currently only be configured - for Google Cloud organizations. Once configured, it applies to - all projects and folders in the Google Cloud organization. + Updates the Log Router CMEK settings for the given + resource. + Note: CMEK for the Log Router can currently only be + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1170,14 +1181,15 @@ def get_settings(self) -> Callable[ Gets the Log Router settings for the given resource. - Note: Settings for the Log Router can be get for Google Cloud - projects, folders, organizations and billing accounts. Currently - it can only be configured for organizations. Once configured for - an organization, it applies to all projects and folders in the - Google Cloud organization. + Note: Settings for the Log Router can be get for Google + Cloud projects, folders, organizations and billing + accounts. Currently it can only be configured for + organizations. Once configured for an organization, it + applies to all projects and folders in the Google Cloud + organization. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: @@ -1204,23 +1216,23 @@ def update_settings(self) -> Callable[ Awaitable[logging_config.Settings]]: r"""Return a callable for the update settings method over gRPC. - Updates the Log Router settings for the given resource. - + Updates the Log Router settings for the given + resource. Note: Settings for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, it - applies to all projects and folders in the Google Cloud - organization. + configured for Google Cloud organizations. Once + configured, it applies to all projects and folders in + the Google Cloud organization. [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - will fail if 1) ``kms_key_name`` is invalid, or 2) the + will fail if 1) `kms_key_name` is invalid, or 2) the associated service account does not have the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned for - the key, or 3) access to the key is disabled. 4) ``location_id`` - is not supported by Logging. 5) ``location_id`` violate - OrgPolicy. + `roles/cloudkms.cryptoKeyEncrypterDecrypter` role + assigned for the key, or 3) access to the key is + disabled. 4) `location_id` is not supported by Logging. + 5) `location_id` violate OrgPolicy. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Returns: diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/async_client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/async_client.py index f84e9f6ec5..35d3873d71 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/async_client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/async_client.py @@ -258,11 +258,12 @@ async def delete_log(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes all the log entries in a log for the \_Default Log - Bucket. The log reappears if it receives new entries. Log - entries written shortly before the delete operation might not be - deleted. Entries received after the delete operation with a - timestamp before the operation will be deleted. + r"""Deletes all the log entries in a log for the _Default + Log Bucket. The log reappears if it receives new + entries. Log entries written shortly before the delete + operation might not be deleted. Entries received after + the delete operation with a timestamp before the + operation will be deleted. .. code-block:: python @@ -291,18 +292,22 @@ async def sample_delete_log(): request (Optional[Union[google.cloud.logging_v2.types.DeleteLogRequest, dict]]): The request object. The parameters to DeleteLog. log_name (:class:`str`): - Required. The resource name of the log to delete: - - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` - - ``[LOG_ID]`` must be URL-encoded. For example, - ``"projects/my-project-id/logs/syslog"``, - ``"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"``. - - For more information about log names, see + Required. The resource name of the + log to delete: + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` + + `[LOG_ID]` must be URL-encoded. For + example, + `"projects/my-project-id/logs/syslog"`, + `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + + For more information about log names, + see [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``log_name`` field @@ -410,87 +415,104 @@ async def sample_write_log_entries(): request (Optional[Union[google.cloud.logging_v2.types.WriteLogEntriesRequest, dict]]): The request object. The parameters to WriteLogEntries. log_name (:class:`str`): - Optional. A default log resource name that is assigned - to all log entries in ``entries`` that do not specify a - value for ``log_name``: - - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` + Optional. A default log resource name + that is assigned to all log entries in + `entries` that do not specify a value + for `log_name`: - ``[LOG_ID]`` must be URL-encoded. For example: + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` - :: + `[LOG_ID]` must be URL-encoded. For + example: "projects/my-project-id/logs/syslog" - "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - The permission ``logging.logEntries.create`` is needed - on each project, organization, billing account, or - folder that is receiving new log entries, whether the - resource is specified in ``logName`` or in an individual - log entry. + The permission + `logging.logEntries.create` is needed on + each project, organization, billing + account, or folder that is receiving new + log entries, whether the resource is + specified in `logName` or in an + individual log entry. This corresponds to the ``log_name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. resource (:class:`google.api.monitored_resource_pb2.MonitoredResource`): - Optional. A default monitored resource object that is - assigned to all log entries in ``entries`` that do not - specify a value for ``resource``. Example: - - :: + Optional. A default monitored + resource object that is assigned to all + log entries in `entries` that do not + specify a value for `resource`. Example: { "type": "gce_instance", "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + "zone": "us-central1-a", + "instance_id": "00000000000000000000" }} - See [LogEntry][google.logging.v2.LogEntry]. + See + [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. labels (:class:`MutableMapping[str, str]`): - Optional. Default labels that are added to the - ``labels`` field of all log entries in ``entries``. If a - log entry already has a label with the same key as a - label in this parameter, then the log entry's label is - not changed. See [LogEntry][google.logging.v2.LogEntry]. + Optional. Default labels that are + added to the `labels` field of all log + entries in `entries`. If a log entry + already has a label with the same key as + a label in this parameter, then the log + entry's label is not changed. See + [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``labels`` field on the ``request`` instance; if ``request`` is provided, this should not be set. entries (:class:`MutableSequence[google.cloud.logging_v2.types.LogEntry]`): - Required. The log entries to send to Logging. The order - of log entries in this list does not matter. Values - supplied in this method's ``log_name``, ``resource``, - and ``labels`` fields are copied into those log entries - in this list that do not include values for their - corresponding fields. For more information, see the - [LogEntry][google.logging.v2.LogEntry] type. - - If the ``timestamp`` or ``insert_id`` fields are missing - in log entries, then this method supplies the current - time or a unique identifier, respectively. The supplied - values are chosen so that, among the log entries that - did not supply their own values, the entries earlier in - the list will sort before the entries later in the list. - See the ``entries.list`` method. - - Log entries with timestamps that are more than the `logs - retention - period `__ in - the past or more than 24 hours in the future will not be - available when calling ``entries.list``. However, those - log entries can still be `exported with - LogSinks `__. - - To improve throughput and to avoid exceeding the `quota - limit `__ for - calls to ``entries.write``, you should try to include - several log entries in this list, rather than calling - this method for each individual log entry. + Required. The log entries to send to + Logging. The order of log entries in + this list does not matter. Values + supplied in this method's `log_name`, + `resource`, and `labels` fields are + copied into those log entries in this + list that do not include values for + their corresponding fields. For more + information, see the + [LogEntry][google.logging.v2.LogEntry] + type. + + If the `timestamp` or `insert_id` fields + are missing in log entries, then this + method supplies the current time or a + unique identifier, respectively. The + supplied values are chosen so that, + among the log entries that did not + supply their own values, the entries + earlier in the list will sort before the + entries later in the list. See the + `entries.list` method. + + Log entries with timestamps that are + more than the [logs retention + period](https://cloud.google.com/logging/quotas) + in the past or more than 24 hours in the + future will not be available when + calling `entries.list`. However, those + log entries can still be [exported with + LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + + To improve throughput and to avoid + exceeding the [quota + limit](https://cloud.google.com/logging/quotas) + for calls to `entries.write`, you should + try to include several log entries in + this list, rather than calling this + method for each individual log entry. This corresponds to the ``entries`` field on the ``request`` instance; if ``request`` is provided, this @@ -561,10 +583,11 @@ async def list_log_entries(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListLogEntriesAsyncPager: - r"""Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. - For ways to export log entries, see `Exporting - Logs `__. + r"""Lists log entries. Use this method to retrieve log + entries that originated from a + project/folder/organization/billing account. For ways + to export log entries, see [Exporting + Logs](https://cloud.google.com/logging/docs/export). .. code-block:: python @@ -595,50 +618,63 @@ async def sample_list_log_entries(): Args: request (Optional[Union[google.cloud.logging_v2.types.ListLogEntriesRequest, dict]]): - The request object. The parameters to ``ListLogEntries``. + The request object. The parameters to `ListLogEntries`. resource_names (:class:`MutableSequence[str]`): - Required. Names of one or more parent resources from - which to retrieve log entries: + Required. Names of one or more parent + resources from which to retrieve log + entries: - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` May alternatively be one or more views: - - ``projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` + * + `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - Projects listed in the ``project_ids`` field are added - to this list. A maximum of 100 resources may be - specified in a single request. + Projects listed in the `project_ids` + field are added to this list. A maximum + of 100 resources may be specified in a + single request. This corresponds to the ``resource_names`` field on the ``request`` instance; if ``request`` is provided, this should not be set. filter (:class:`str`): - Optional. Only log entries that match the filter are - returned. An empty filter matches all log entries in the - resources listed in ``resource_names``. Referencing a - parent resource that is not listed in ``resource_names`` - will cause the filter to return no results. The maximum - length of a filter is 20,000 characters. + Optional. Only log entries that match + the filter are returned. An empty + filter matches all log entries in the + resources listed in `resource_names`. + Referencing a parent resource that is + not listed in `resource_names` will + cause the filter to return no results. + The maximum length of a filter is 20,000 + characters. This corresponds to the ``filter`` field on the ``request`` instance; if ``request`` is provided, this should not be set. order_by (:class:`str`): - Optional. How the results should be sorted. Presently, - the only permitted values are ``"timestamp asc"`` - (default) and ``"timestamp desc"``. The first option - returns entries in order of increasing values of - ``LogEntry.timestamp`` (oldest first), and the second - option returns entries in order of decreasing timestamps - (newest first). Entries with equal timestamps are - returned in order of their ``insert_id`` values. + Optional. How the results should be + sorted. Presently, the only permitted + values are `"timestamp asc"` (default) + and `"timestamp desc"`. The first option + returns entries in order of increasing + values of `LogEntry.timestamp` (oldest + first), and the second option returns + entries in order of decreasing + timestamps (newest first). Entries with + equal timestamps are returned in order + of their `insert_id` values. This corresponds to the ``order_by`` field on the ``request`` instance; if ``request`` is provided, this @@ -653,10 +689,11 @@ async def sample_list_log_entries(): Returns: google.cloud.logging_v2.services.logging_service_v2.pagers.ListLogEntriesAsyncPager: - Result returned from ListLogEntries. - - Iterating over this object will yield results and - resolve additional pages automatically. + Result returned from + `ListLogEntries`. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -846,12 +883,13 @@ async def sample_list_logs(): request (Optional[Union[google.cloud.logging_v2.types.ListLogsRequest, dict]]): The request object. The parameters to ListLogs. parent (:class:`str`): - Required. The resource name to list logs for: - - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + Required. The resource name to list + logs for: + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -979,7 +1017,7 @@ def request_generator(): Args: requests (AsyncIterator[`google.cloud.logging_v2.types.TailLogEntriesRequest`]): - The request object AsyncIterator. The parameters to ``TailLogEntries``. + The request object AsyncIterator. The parameters to `TailLogEntries`. retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -990,7 +1028,9 @@ def request_generator(): Returns: AsyncIterable[google.cloud.logging_v2.types.TailLogEntriesResponse]: - Result returned from TailLogEntries. + Result returned from + `TailLogEntries`. + """ # Wrap the RPC method; this adds retry and timeout information, diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/client.py index a2d4b1a336..3eddc1f95a 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/client.py @@ -605,11 +605,12 @@ def delete_log(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> None: - r"""Deletes all the log entries in a log for the \_Default Log - Bucket. The log reappears if it receives new entries. Log - entries written shortly before the delete operation might not be - deleted. Entries received after the delete operation with a - timestamp before the operation will be deleted. + r"""Deletes all the log entries in a log for the _Default + Log Bucket. The log reappears if it receives new + entries. Log entries written shortly before the delete + operation might not be deleted. Entries received after + the delete operation with a timestamp before the + operation will be deleted. .. code-block:: python @@ -638,18 +639,22 @@ def sample_delete_log(): request (Union[google.cloud.logging_v2.types.DeleteLogRequest, dict]): The request object. The parameters to DeleteLog. log_name (str): - Required. The resource name of the log to delete: - - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` - - ``[LOG_ID]`` must be URL-encoded. For example, - ``"projects/my-project-id/logs/syslog"``, - ``"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"``. - - For more information about log names, see + Required. The resource name of the + log to delete: + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` + + `[LOG_ID]` must be URL-encoded. For + example, + `"projects/my-project-id/logs/syslog"`, + `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + + For more information about log names, + see [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``log_name`` field @@ -756,87 +761,104 @@ def sample_write_log_entries(): request (Union[google.cloud.logging_v2.types.WriteLogEntriesRequest, dict]): The request object. The parameters to WriteLogEntries. log_name (str): - Optional. A default log resource name that is assigned - to all log entries in ``entries`` that do not specify a - value for ``log_name``: - - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` + Optional. A default log resource name + that is assigned to all log entries in + `entries` that do not specify a value + for `log_name`: - ``[LOG_ID]`` must be URL-encoded. For example: + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` - :: + `[LOG_ID]` must be URL-encoded. For + example: "projects/my-project-id/logs/syslog" - "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - The permission ``logging.logEntries.create`` is needed - on each project, organization, billing account, or - folder that is receiving new log entries, whether the - resource is specified in ``logName`` or in an individual - log entry. + The permission + `logging.logEntries.create` is needed on + each project, organization, billing + account, or folder that is receiving new + log entries, whether the resource is + specified in `logName` or in an + individual log entry. This corresponds to the ``log_name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. resource (google.api.monitored_resource_pb2.MonitoredResource): - Optional. A default monitored resource object that is - assigned to all log entries in ``entries`` that do not - specify a value for ``resource``. Example: - - :: + Optional. A default monitored + resource object that is assigned to all + log entries in `entries` that do not + specify a value for `resource`. Example: { "type": "gce_instance", "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + "zone": "us-central1-a", + "instance_id": "00000000000000000000" }} - See [LogEntry][google.logging.v2.LogEntry]. + See + [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``resource`` field on the ``request`` instance; if ``request`` is provided, this should not be set. labels (MutableMapping[str, str]): - Optional. Default labels that are added to the - ``labels`` field of all log entries in ``entries``. If a - log entry already has a label with the same key as a - label in this parameter, then the log entry's label is - not changed. See [LogEntry][google.logging.v2.LogEntry]. + Optional. Default labels that are + added to the `labels` field of all log + entries in `entries`. If a log entry + already has a label with the same key as + a label in this parameter, then the log + entry's label is not changed. See + [LogEntry][google.logging.v2.LogEntry]. This corresponds to the ``labels`` field on the ``request`` instance; if ``request`` is provided, this should not be set. entries (MutableSequence[google.cloud.logging_v2.types.LogEntry]): - Required. The log entries to send to Logging. The order - of log entries in this list does not matter. Values - supplied in this method's ``log_name``, ``resource``, - and ``labels`` fields are copied into those log entries - in this list that do not include values for their - corresponding fields. For more information, see the - [LogEntry][google.logging.v2.LogEntry] type. - - If the ``timestamp`` or ``insert_id`` fields are missing - in log entries, then this method supplies the current - time or a unique identifier, respectively. The supplied - values are chosen so that, among the log entries that - did not supply their own values, the entries earlier in - the list will sort before the entries later in the list. - See the ``entries.list`` method. - - Log entries with timestamps that are more than the `logs - retention - period `__ in - the past or more than 24 hours in the future will not be - available when calling ``entries.list``. However, those - log entries can still be `exported with - LogSinks `__. - - To improve throughput and to avoid exceeding the `quota - limit `__ for - calls to ``entries.write``, you should try to include - several log entries in this list, rather than calling - this method for each individual log entry. + Required. The log entries to send to + Logging. The order of log entries in + this list does not matter. Values + supplied in this method's `log_name`, + `resource`, and `labels` fields are + copied into those log entries in this + list that do not include values for + their corresponding fields. For more + information, see the + [LogEntry][google.logging.v2.LogEntry] + type. + + If the `timestamp` or `insert_id` fields + are missing in log entries, then this + method supplies the current time or a + unique identifier, respectively. The + supplied values are chosen so that, + among the log entries that did not + supply their own values, the entries + earlier in the list will sort before the + entries later in the list. See the + `entries.list` method. + + Log entries with timestamps that are + more than the [logs retention + period](https://cloud.google.com/logging/quotas) + in the past or more than 24 hours in the + future will not be available when + calling `entries.list`. However, those + log entries can still be [exported with + LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + + To improve throughput and to avoid + exceeding the [quota + limit](https://cloud.google.com/logging/quotas) + for calls to `entries.write`, you should + try to include several log entries in + this list, rather than calling this + method for each individual log entry. This corresponds to the ``entries`` field on the ``request`` instance; if ``request`` is provided, this @@ -905,10 +927,11 @@ def list_log_entries(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListLogEntriesPager: - r"""Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. - For ways to export log entries, see `Exporting - Logs `__. + r"""Lists log entries. Use this method to retrieve log + entries that originated from a + project/folder/organization/billing account. For ways + to export log entries, see [Exporting + Logs](https://cloud.google.com/logging/docs/export). .. code-block:: python @@ -939,50 +962,63 @@ def sample_list_log_entries(): Args: request (Union[google.cloud.logging_v2.types.ListLogEntriesRequest, dict]): - The request object. The parameters to ``ListLogEntries``. + The request object. The parameters to `ListLogEntries`. resource_names (MutableSequence[str]): - Required. Names of one or more parent resources from - which to retrieve log entries: + Required. Names of one or more parent + resources from which to retrieve log + entries: - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` May alternatively be one or more views: - - ``projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` + * + `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - Projects listed in the ``project_ids`` field are added - to this list. A maximum of 100 resources may be - specified in a single request. + Projects listed in the `project_ids` + field are added to this list. A maximum + of 100 resources may be specified in a + single request. This corresponds to the ``resource_names`` field on the ``request`` instance; if ``request`` is provided, this should not be set. filter (str): - Optional. Only log entries that match the filter are - returned. An empty filter matches all log entries in the - resources listed in ``resource_names``. Referencing a - parent resource that is not listed in ``resource_names`` - will cause the filter to return no results. The maximum - length of a filter is 20,000 characters. + Optional. Only log entries that match + the filter are returned. An empty + filter matches all log entries in the + resources listed in `resource_names`. + Referencing a parent resource that is + not listed in `resource_names` will + cause the filter to return no results. + The maximum length of a filter is 20,000 + characters. This corresponds to the ``filter`` field on the ``request`` instance; if ``request`` is provided, this should not be set. order_by (str): - Optional. How the results should be sorted. Presently, - the only permitted values are ``"timestamp asc"`` - (default) and ``"timestamp desc"``. The first option - returns entries in order of increasing values of - ``LogEntry.timestamp`` (oldest first), and the second - option returns entries in order of decreasing timestamps - (newest first). Entries with equal timestamps are - returned in order of their ``insert_id`` values. + Optional. How the results should be + sorted. Presently, the only permitted + values are `"timestamp asc"` (default) + and `"timestamp desc"`. The first option + returns entries in order of increasing + values of `LogEntry.timestamp` (oldest + first), and the second option returns + entries in order of decreasing + timestamps (newest first). Entries with + equal timestamps are returned in order + of their `insert_id` values. This corresponds to the ``order_by`` field on the ``request`` instance; if ``request`` is provided, this @@ -997,10 +1033,11 @@ def sample_list_log_entries(): Returns: google.cloud.logging_v2.services.logging_service_v2.pagers.ListLogEntriesPager: - Result returned from ListLogEntries. - - Iterating over this object will yield results and - resolve additional pages automatically. + Result returned from + `ListLogEntries`. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -1189,12 +1226,13 @@ def sample_list_logs(): request (Union[google.cloud.logging_v2.types.ListLogsRequest, dict]): The request object. The parameters to ListLogs. parent (str): - Required. The resource name to list logs for: - - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + Required. The resource name to list + logs for: + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1321,7 +1359,7 @@ def request_generator(): Args: requests (Iterator[google.cloud.logging_v2.types.TailLogEntriesRequest]): - The request object iterator. The parameters to ``TailLogEntries``. + The request object iterator. The parameters to `TailLogEntries`. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1332,7 +1370,9 @@ def request_generator(): Returns: Iterable[google.cloud.logging_v2.types.TailLogEntriesResponse]: - Result returned from TailLogEntries. + Result returned from + `TailLogEntries`. + """ # Wrap the RPC method; this adds retry and timeout information, diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py index 8edc617027..fc24294257 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py @@ -317,11 +317,12 @@ def delete_log(self) -> Callable[ empty_pb2.Empty]: r"""Return a callable for the delete log method over gRPC. - Deletes all the log entries in a log for the \_Default Log - Bucket. The log reappears if it receives new entries. Log - entries written shortly before the delete operation might not be - deleted. Entries received after the delete operation with a - timestamp before the operation will be deleted. + Deletes all the log entries in a log for the _Default + Log Bucket. The log reappears if it receives new + entries. Log entries written shortly before the delete + operation might not be deleted. Entries received after + the delete operation with a timestamp before the + operation will be deleted. Returns: Callable[[~.DeleteLogRequest], @@ -379,10 +380,11 @@ def list_log_entries(self) -> Callable[ logging.ListLogEntriesResponse]: r"""Return a callable for the list log entries method over gRPC. - Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. - For ways to export log entries, see `Exporting - Logs `__. + Lists log entries. Use this method to retrieve log + entries that originated from a + project/folder/organization/billing account. For ways + to export log entries, see [Exporting + Logs](https://cloud.google.com/logging/docs/export). Returns: Callable[[~.ListLogEntriesRequest], diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py index 92aa1d5256..2171a045c7 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py @@ -323,11 +323,12 @@ def delete_log(self) -> Callable[ Awaitable[empty_pb2.Empty]]: r"""Return a callable for the delete log method over gRPC. - Deletes all the log entries in a log for the \_Default Log - Bucket. The log reappears if it receives new entries. Log - entries written shortly before the delete operation might not be - deleted. Entries received after the delete operation with a - timestamp before the operation will be deleted. + Deletes all the log entries in a log for the _Default + Log Bucket. The log reappears if it receives new + entries. Log entries written shortly before the delete + operation might not be deleted. Entries received after + the delete operation with a timestamp before the + operation will be deleted. Returns: Callable[[~.DeleteLogRequest], @@ -385,10 +386,11 @@ def list_log_entries(self) -> Callable[ Awaitable[logging.ListLogEntriesResponse]]: r"""Return a callable for the list log entries method over gRPC. - Lists log entries. Use this method to retrieve log entries that - originated from a project/folder/organization/billing account. - For ways to export log entries, see `Exporting - Logs `__. + Lists log entries. Use this method to retrieve log + entries that originated from a + project/folder/organization/billing account. For ways + to export log entries, see [Exporting + Logs](https://cloud.google.com/logging/docs/export). Returns: Callable[[~.ListLogEntriesRequest], diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/async_client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/async_client.py index 5f0bf0c782..eb6fa14292 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/async_client.py @@ -292,11 +292,8 @@ async def sample_list_log_metrics(): request (Optional[Union[google.cloud.logging_v2.types.ListLogMetricsRequest, dict]]): The request object. The parameters to ListLogMetrics. parent (:class:`str`): - Required. The name of the project containing the - metrics: - - :: - + Required. The name of the project + containing the metrics: "projects/[PROJECT_ID]" This corresponds to the ``parent`` field @@ -415,11 +412,9 @@ async def sample_get_log_metric(): request (Optional[Union[google.cloud.logging_v2.types.GetLogMetricRequest, dict]]): The request object. The parameters to GetLogMetric. metric_name (:class:`str`): - Required. The resource name of the desired metric: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + desired metric: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -539,14 +534,12 @@ async def sample_create_log_metric(): request (Optional[Union[google.cloud.logging_v2.types.CreateLogMetricRequest, dict]]): The request object. The parameters to CreateLogMetric. parent (:class:`str`): - Required. The resource name of the project in which to - create the metric: - - :: - + Required. The resource name of the + project in which to create the metric: "projects/[PROJECT_ID]" - The new metric must be provided in the request. + The new metric must be provided in the + request. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -676,16 +669,15 @@ async def sample_update_log_metric(): request (Optional[Union[google.cloud.logging_v2.types.UpdateLogMetricRequest, dict]]): The request object. The parameters to UpdateLogMetric. metric_name (:class:`str`): - Required. The resource name of the metric to update: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + metric to update: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - The updated metric must be provided in the request and - it's ``name`` field must be the same as ``[METRIC_ID]`` - If the metric does not exist in ``[PROJECT_ID]``, then a - new metric is created. + The updated metric must be provided in + the request and it's `name` field must + be the same as `[METRIC_ID]` If the + metric does not exist in `[PROJECT_ID]`, + then a new metric is created. This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -803,11 +795,9 @@ async def sample_delete_log_metric(): request (Optional[Union[google.cloud.logging_v2.types.DeleteLogMetricRequest, dict]]): The request object. The parameters to DeleteLogMetric. metric_name (:class:`str`): - Required. The resource name of the metric to delete: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + metric to delete: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/client.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/client.py index 377daf633c..5d605e66c1 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/client.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/client.py @@ -639,11 +639,8 @@ def sample_list_log_metrics(): request (Union[google.cloud.logging_v2.types.ListLogMetricsRequest, dict]): The request object. The parameters to ListLogMetrics. parent (str): - Required. The name of the project containing the - metrics: - - :: - + Required. The name of the project + containing the metrics: "projects/[PROJECT_ID]" This corresponds to the ``parent`` field @@ -761,11 +758,9 @@ def sample_get_log_metric(): request (Union[google.cloud.logging_v2.types.GetLogMetricRequest, dict]): The request object. The parameters to GetLogMetric. metric_name (str): - Required. The resource name of the desired metric: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + desired metric: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -884,14 +879,12 @@ def sample_create_log_metric(): request (Union[google.cloud.logging_v2.types.CreateLogMetricRequest, dict]): The request object. The parameters to CreateLogMetric. parent (str): - Required. The resource name of the project in which to - create the metric: - - :: - + Required. The resource name of the + project in which to create the metric: "projects/[PROJECT_ID]" - The new metric must be provided in the request. + The new metric must be provided in the + request. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -1020,16 +1013,15 @@ def sample_update_log_metric(): request (Union[google.cloud.logging_v2.types.UpdateLogMetricRequest, dict]): The request object. The parameters to UpdateLogMetric. metric_name (str): - Required. The resource name of the metric to update: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + metric to update: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - The updated metric must be provided in the request and - it's ``name`` field must be the same as ``[METRIC_ID]`` - If the metric does not exist in ``[PROJECT_ID]``, then a - new metric is created. + The updated metric must be provided in + the request and it's `name` field must + be the same as `[METRIC_ID]` If the + metric does not exist in `[PROJECT_ID]`, + then a new metric is created. This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1146,11 +1138,9 @@ def sample_delete_log_metric(): request (Union[google.cloud.logging_v2.types.DeleteLogMetricRequest, dict]): The request object. The parameters to DeleteLogMetric. metric_name (str): - Required. The resource name of the metric to delete: - - :: - - "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + Required. The resource name of the + metric to delete: + "projects/[PROJECT_ID]/metrics/[METRIC_ID]" This corresponds to the ``metric_name`` field on the ``request`` instance; if ``request`` is provided, this diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/log_entry.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/log_entry.py index 695393863f..326c5a4aa5 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/log_entry.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/log_entry.py @@ -50,35 +50,35 @@ class LogEntry(proto.Message): Attributes: log_name (str): - Required. The resource name of the log to which this log - entry belongs: - - :: - + Required. The resource name of the log to + which this log entry belongs: "projects/[PROJECT_ID]/logs/[LOG_ID]" - "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - "folders/[FOLDER_ID]/logs/[LOG_ID]" - - A project number may be used in place of PROJECT_ID. The - project number is translated to its corresponding PROJECT_ID - internally and the ``log_name`` field will contain - PROJECT_ID in queries and exports. - - ``[LOG_ID]`` must be URL-encoded within ``log_name``. - Example: - ``"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"``. - - ``[LOG_ID]`` must be less than 512 characters long and can - only include the following characters: upper and lower case - alphanumeric characters, forward-slash, underscore, hyphen, - and period. - - For backward compatibility, if ``log_name`` begins with a - forward-slash, such as ``/projects/...``, then the log entry - is ingested as usual, but the forward-slash is removed. - Listing the log entry will not show the leading slash and - filtering for a log name with a leading slash will never + "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + "folders/[FOLDER_ID]/logs/[LOG_ID]" + + A project number may be used in place of + PROJECT_ID. The project number is translated to + its corresponding PROJECT_ID internally and the + `log_name` field will contain PROJECT_ID in + queries and exports. + + `[LOG_ID]` must be URL-encoded within + `log_name`. Example: + + `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + + `[LOG_ID]` must be less than 512 characters long + and can only include the following characters: + upper and lower case alphanumeric characters, + forward-slash, underscore, hyphen, and period. + + For backward compatibility, if `log_name` begins + with a forward-slash, such as `/projects/...`, + then the log entry is ingested as usual, but the + forward-slash is removed. Listing the log entry + will not show the leading slash and filtering + for a log name with a leading slash will never return any results. resource (google.api.monitored_resource_pb2.MonitoredResource): Required. The monitored resource that @@ -111,123 +111,137 @@ class LogEntry(proto.Message): This field is a member of `oneof`_ ``payload``. timestamp (google.protobuf.timestamp_pb2.Timestamp): - Optional. The time the event described by the log entry - occurred. This time is used to compute the log entry's age - and to enforce the logs retention period. If this field is - omitted in a new log entry, then Logging assigns it the - current time. Timestamps have nanosecond accuracy, but - trailing zeros in the fractional seconds might be omitted - when the timestamp is displayed. - - Incoming log entries must have timestamps that don't exceed - the `logs retention - period `__ - in the past, and that don't exceed 24 hours in the future. - Log entries outside those time boundaries aren't ingested by - Logging. + Optional. The time the event described by the + log entry occurred. This time is used to compute + the log entry's age and to enforce the logs + retention period. If this field is omitted in a + new log entry, then Logging assigns it the + current time. Timestamps have nanosecond + accuracy, but trailing zeros in the fractional + seconds might be omitted when the timestamp is + displayed. + + Incoming log entries must have timestamps that + don't exceed the [logs retention + period](https://cloud.google.com/logging/quotas#logs_retention_periods) + in the past, and that don't exceed 24 hours in + the future. Log entries outside those time + boundaries aren't ingested by Logging. receive_timestamp (google.protobuf.timestamp_pb2.Timestamp): Output only. The time the log entry was received by Logging. severity (google.logging.type.log_severity_pb2.LogSeverity): - Optional. The severity of the log entry. The default value - is ``LogSeverity.DEFAULT``. + Optional. The severity of the log entry. The + default value is `LogSeverity.DEFAULT`. insert_id (str): - Optional. A unique identifier for the log entry. If you - provide a value, then Logging considers other log entries in - the same project, with the same ``timestamp``, and with the - same ``insert_id`` to be duplicates which are removed in a - single query result. However, there are no guarantees of - de-duplication in the export of logs. - - If the ``insert_id`` is omitted when writing a log entry, - the Logging API assigns its own unique identifier in this - field. - - In queries, the ``insert_id`` is also used to order log - entries that have the same ``log_name`` and ``timestamp`` - values. + Optional. A unique identifier for the log + entry. If you provide a value, then Logging + considers other log entries in the same project, + with the same `timestamp`, and with the same + `insert_id` to be duplicates which are removed + in a single query result. However, there are no + guarantees of de-duplication in the export of + logs. + + If the `insert_id` is omitted when writing a log + entry, the Logging API assigns its own unique + identifier in this field. + + In queries, the `insert_id` is also used to + order log entries that have the same `log_name` + and `timestamp` values. http_request (google.logging.type.http_request_pb2.HttpRequest): Optional. Information about the HTTP request associated with this log entry, if applicable. labels (MutableMapping[str, str]): - Optional. A map of key, value pairs that provides additional - information about the log entry. The labels can be - user-defined or system-defined. - - User-defined labels are arbitrary key, value pairs that you - can use to classify logs. - - System-defined labels are defined by GCP services for - platform logs. They have two components - a service - namespace component and the attribute name. For example: - ``compute.googleapis.com/resource_name``. - - Cloud Logging truncates label keys that exceed 512 B and - label values that exceed 64 KB upon their associated log - entry being written. The truncation is indicated by an - ellipsis at the end of the character string. + Optional. A map of key, value pairs that + provides additional information about the log + entry. The labels can be user-defined or + system-defined. + + User-defined labels are arbitrary key, value + pairs that you can use to classify logs. + + System-defined labels are defined by GCP + services for platform logs. They have two + components - a service namespace component and + the attribute name. For example: + `compute.googleapis.com/resource_name`. + + Cloud Logging truncates label keys that exceed + 512 B and label values that exceed 64 KB upon + their associated log entry being written. The + truncation is indicated by an ellipsis at the + end of the character string. operation (google.cloud.logging_v2.types.LogEntryOperation): Optional. Information about an operation associated with the log entry, if applicable. trace (str): - Optional. The REST resource name of the trace being written - to `Cloud Trace `__ in - association with this log entry. For example, if your trace - data is stored in the Cloud project "my-trace-project" and - if the service that is creating the log entry receives a - trace header that includes the trace ID "12345", then the + Optional. The REST resource name of the trace + being written to [Cloud + Trace](https://cloud.google.com/trace) in + association with this log entry. For example, if + your trace data is stored in the Cloud project + "my-trace-project" and if the service that is + creating the log entry receives a trace header + that includes the trace ID "12345", then the service should use "projects/my-tracing-project/traces/12345". - The ``trace`` field provides the link between logs and - traces. By using this field, you can navigate from a log - entry to a trace. + The `trace` field provides the link between logs + and traces. By using this field, you can + navigate from a log entry to a trace. span_id (str): - Optional. The ID of the `Cloud - Trace `__ span associated - with the current operation in which the log is being - written. For example, if a span has the REST resource name - of + Optional. The ID of the [Cloud + Trace](https://cloud.google.com/trace) span + associated with the current operation in which + the log is being written. For example, if a span + has the REST resource name of "projects/some-project/traces/some-trace/spans/some-span-id", - then the ``span_id`` field is "some-span-id". + then the `span_id` field is "some-span-id". A - `Span `__ - represents a single operation within a trace. Whereas a - trace may involve multiple different microservices running - on multiple different machines, a span generally corresponds - to a single logical operation being performed in a single - instance of a microservice on one specific machine. Spans - are the nodes within the tree that is a trace. - - Applications that are `instrumented for - tracing `__ will - generally assign a new, unique span ID on each incoming - request. It is also common to create and record additional - spans corresponding to internal processing elements as well - as issuing requests to dependencies. - - The span ID is expected to be a 16-character, hexadecimal - encoding of an 8-byte array and should not be zero. It - should be unique within the trace and should, ideally, be - generated in a manner that is uniformly random. + [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) + represents a single operation within a trace. + Whereas a trace may involve multiple different + microservices running on multiple different + machines, a span generally corresponds to a + single logical operation being performed in a + single instance of a microservice on one + specific machine. Spans are the nodes within the + tree that is a trace. + + Applications that are [instrumented for + tracing](https://cloud.google.com/trace/docs/setup) + will generally assign a new, unique span ID on + each incoming request. It is also common to + create and record additional spans corresponding + to internal processing elements as well as + issuing requests to dependencies. + + The span ID is expected to be a 16-character, + hexadecimal encoding of an 8-byte array and + should not be zero. It should be unique within + the trace and should, ideally, be generated in a + manner that is uniformly random. Example values: - - ``000000000000004a`` - - ``7a2190356c3fc94b`` - - ``0000f00300090021`` - - ``d39223e101960076`` + - `000000000000004a` + - `7a2190356c3fc94b` + - `0000f00300090021` + - `d39223e101960076` trace_sampled (bool): - Optional. The sampling decision of the trace associated with - the log entry. - - True means that the trace resource name in the ``trace`` - field was sampled for storage in a trace backend. False - means that the trace was not sampled for storage when this - log entry was written, or the sampling decision was unknown - at the time. A non-sampled ``trace`` value is still useful - as a request correlation identifier. The default is False. + Optional. The sampling decision of the trace + associated with the log entry. + True means that the trace resource name in the + `trace` field was sampled for storage in a trace + backend. False means that the trace was not + sampled for storage when this log entry was + written, or the sampling decision was unknown at + the time. A non-sampled `trace` value is still + useful as a request correlation identifier. The + default is False. source_location (google.cloud.logging_v2.types.LogEntrySourceLocation): Optional. Source code location information associated with the log entry, if any. @@ -331,10 +345,12 @@ class LogEntryOperation(proto.Message): Log entries with the same identifier are assumed to be part of the same operation. producer (str): - Optional. An arbitrary producer identifier. The combination - of ``id`` and ``producer`` must be globally unique. Examples - for ``producer``: ``"MyDivision.MyBigCompany.com"``, - ``"github.com/MyProject/MyApplication"``. + Optional. An arbitrary producer identifier. + The combination of `id` and `producer` must be + globally unique. Examples for `producer`: + + `"MyDivision.MyBigCompany.com"`, + `"github.com/MyProject/MyApplication"`. first (bool): Optional. Set this to True if this is the first log entry in the operation. @@ -374,13 +390,16 @@ class LogEntrySourceLocation(proto.Message): Optional. Line within the source file. 1-based; 0 indicates no line number available. function (str): - Optional. Human-readable name of the function or method - being invoked, with optional context such as the class or - package name. This information may be used in contexts such - as the logs viewer, where a file and line number are less - meaningful. The format can vary by language. For example: - ``qual.if.ied.Class.method`` (Java), ``dir/package.func`` - (Go), ``function`` (Python). + Optional. Human-readable name of the function + or method being invoked, with optional context + such as the class or package name. This + information may be used in contexts such as the + logs viewer, where a file and line number are + less meaningful. The format can vary by + language. For example: + + `qual.if.ied.Class.method` (Java), + `dir/package.func` (Go), `function` (Python). """ file: str = proto.Field( @@ -405,14 +424,16 @@ class LogSplit(proto.Message): Attributes: uid (str): - A globally unique identifier for all log entries in a - sequence of split log entries. All log entries with the same - \|LogSplit.uid\| are assumed to be part of the same sequence - of split log entries. + A globally unique identifier for all log + entries in a sequence of split log entries. All + log entries with the same |LogSplit.uid| are + assumed to be part of the same sequence of split + log entries. index (int): - The index of this LogEntry in the sequence of split log - entries. Log entries are given \|index\| values 0, 1, ..., - n-1 for a sequence of n log entries. + The index of this LogEntry in the sequence of + split log entries. Log entries are given |index| + values 0, 1, ..., n-1 for a sequence of n log + entries. total_splits (int): The total number of log entries that the original LogEntry was split into. diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging.py index 5b1dd80ceb..7efc5cc6e9 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging.py @@ -49,16 +49,18 @@ class DeleteLogRequest(proto.Message): Attributes: log_name (str): - Required. The resource name of the log to delete: - - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` - - ``[LOG_ID]`` must be URL-encoded. For example, - ``"projects/my-project-id/logs/syslog"``, - ``"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"``. + Required. The resource name of the log to + delete: + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` + + `[LOG_ID]` must be URL-encoded. For example, + `"projects/my-project-id/logs/syslog"`, + `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. For more information about log names, see [LogEntry][google.logging.v2.LogEntry]. @@ -75,84 +77,94 @@ class WriteLogEntriesRequest(proto.Message): Attributes: log_name (str): - Optional. A default log resource name that is assigned to - all log entries in ``entries`` that do not specify a value - for ``log_name``: + Optional. A default log resource name that is + assigned to all log entries in `entries` that do + not specify a value for `log_name`: - - ``projects/[PROJECT_ID]/logs/[LOG_ID]`` - - ``organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`` - - ``folders/[FOLDER_ID]/logs/[LOG_ID]`` + * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * + `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * `folders/[FOLDER_ID]/logs/[LOG_ID]` - ``[LOG_ID]`` must be URL-encoded. For example: - - :: + `[LOG_ID]` must be URL-encoded. For example: "projects/my-project-id/logs/syslog" - "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - The permission ``logging.logEntries.create`` is needed on - each project, organization, billing account, or folder that - is receiving new log entries, whether the resource is - specified in ``logName`` or in an individual log entry. + The permission `logging.logEntries.create` is + needed on each project, organization, billing + account, or folder that is receiving new log + entries, whether the resource is specified in + `logName` or in an individual log entry. resource (google.api.monitored_resource_pb2.MonitoredResource): - Optional. A default monitored resource object that is - assigned to all log entries in ``entries`` that do not - specify a value for ``resource``. Example: - - :: + Optional. A default monitored resource object + that is assigned to all log entries in `entries` + that do not specify a value for `resource`. + Example: { "type": "gce_instance", "labels": { - "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + "zone": "us-central1-a", "instance_id": + "00000000000000000000" }} See [LogEntry][google.logging.v2.LogEntry]. labels (MutableMapping[str, str]): - Optional. Default labels that are added to the ``labels`` - field of all log entries in ``entries``. If a log entry - already has a label with the same key as a label in this - parameter, then the log entry's label is not changed. See + Optional. Default labels that are added to + the `labels` field of all log entries in + `entries`. If a log entry already has a label + with the same key as a label in this parameter, + then the log entry's label is not changed. See [LogEntry][google.logging.v2.LogEntry]. entries (MutableSequence[google.cloud.logging_v2.types.LogEntry]): - Required. The log entries to send to Logging. The order of - log entries in this list does not matter. Values supplied in - this method's ``log_name``, ``resource``, and ``labels`` - fields are copied into those log entries in this list that - do not include values for their corresponding fields. For - more information, see the + Required. The log entries to send to Logging. + The order of log entries in this list does not + matter. Values supplied in this method's + `log_name`, `resource`, and `labels` fields are + copied into those log entries in this list that + do not include values for their corresponding + fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. - If the ``timestamp`` or ``insert_id`` fields are missing in - log entries, then this method supplies the current time or a - unique identifier, respectively. The supplied values are - chosen so that, among the log entries that did not supply - their own values, the entries earlier in the list will sort - before the entries later in the list. See the - ``entries.list`` method. - - Log entries with timestamps that are more than the `logs - retention - period `__ in the - past or more than 24 hours in the future will not be - available when calling ``entries.list``. However, those log - entries can still be `exported with - LogSinks `__. - - To improve throughput and to avoid exceeding the `quota - limit `__ for calls - to ``entries.write``, you should try to include several log - entries in this list, rather than calling this method for - each individual log entry. + If the `timestamp` or `insert_id` fields are + missing in log entries, then this method + supplies the current time or a unique + identifier, respectively. The supplied values + are chosen so that, among the log entries that + did not supply their own values, the entries + earlier in the list will sort before the entries + later in the list. See the `entries.list` + method. + + Log entries with timestamps that are more than + the [logs retention + period](https://cloud.google.com/logging/quotas) + in the past or more than 24 hours in the future + will not be available when calling + `entries.list`. However, those log entries can + still be [exported with + LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + + To improve throughput and to avoid exceeding the + [quota + limit](https://cloud.google.com/logging/quotas) + for calls to `entries.write`, you should try to + include several log entries in this list, rather + than calling this method for each individual log + entry. partial_success (bool): - Optional. Whether a batch's valid entries should be written - even if some other entry failed due to a permanent error - such as INVALID_ARGUMENT or PERMISSION_DENIED. If any entry - failed, then the response status is the response status of - one of the failed entries. The response will include error - details in ``WriteLogEntriesPartialErrors.log_entry_errors`` - keyed by the entries' zero-based index in the ``entries``. - Failed requests for which no entries are written will not - include per-entry errors. + Optional. Whether a batch's valid entries + should be written even if some other entry + failed due to a permanent error such as + INVALID_ARGUMENT or PERMISSION_DENIED. If any + entry failed, then the response status is the + response status of one of the failed entries. + The response will include error details in + `WriteLogEntriesPartialErrors.log_entry_errors` + keyed by the entries' zero-based index in the + `entries`. Failed requests for which no entries + are written will not include per-entry errors. dry_run (bool): Optional. If true, the request should expect normal response, but the entries won't be @@ -200,13 +212,14 @@ class WriteLogEntriesPartialErrors(proto.Message): Attributes: log_entry_errors (MutableMapping[int, google.rpc.status_pb2.Status]): - When ``WriteLogEntriesRequest.partial_success`` is true, - records the error status for entries that were not written - due to a permanent error, keyed by the entry's zero-based - index in ``WriteLogEntriesRequest.entries``. - - Failed requests for which no entries are written will not - include per-entry errors. + When `WriteLogEntriesRequest.partial_success` + is true, records the error status for entries + that were not written due to a permanent error, + keyed by the entry's zero-based index in + `WriteLogEntriesRequest.entries`. + + Failed requests for which no entries are written + will not include per-entry errors. """ log_entry_errors: MutableMapping[int, status_pb2.Status] = proto.MapField( @@ -218,56 +231,65 @@ class WriteLogEntriesPartialErrors(proto.Message): class ListLogEntriesRequest(proto.Message): - r"""The parameters to ``ListLogEntries``. + r"""The parameters to `ListLogEntries`. Attributes: resource_names (MutableSequence[str]): - Required. Names of one or more parent resources from which - to retrieve log entries: + Required. Names of one or more parent + resources from which to retrieve log entries: - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` May alternatively be one or more views: - - ``projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - Projects listed in the ``project_ids`` field are added to - this list. A maximum of 100 resources may be specified in a - single request. + * + `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + + Projects listed in the `project_ids` field are + added to this list. A maximum of 100 resources + may be specified in a single request. filter (str): - Optional. Only log entries that match the filter are - returned. An empty filter matches all log entries in the - resources listed in ``resource_names``. Referencing a parent - resource that is not listed in ``resource_names`` will cause - the filter to return no results. The maximum length of a - filter is 20,000 characters. + Optional. Only log entries that match the + filter are returned. An empty filter matches + all log entries in the resources listed in + `resource_names`. Referencing a parent resource + that is not listed in `resource_names` will + cause the filter to return no results. The + maximum length of a filter is 20,000 characters. order_by (str): - Optional. How the results should be sorted. Presently, the - only permitted values are ``"timestamp asc"`` (default) and - ``"timestamp desc"``. The first option returns entries in - order of increasing values of ``LogEntry.timestamp`` (oldest - first), and the second option returns entries in order of - decreasing timestamps (newest first). Entries with equal - timestamps are returned in order of their ``insert_id`` - values. + Optional. How the results should be sorted. + Presently, the only permitted values are + `"timestamp asc"` (default) and `"timestamp + desc"`. The first option returns entries in + order of increasing values of + `LogEntry.timestamp` (oldest first), and the + second option returns entries in order of + decreasing timestamps (newest first). Entries + with equal timestamps are returned in order of + their `insert_id` values. page_size (int): - Optional. The maximum number of results to return from this - request. Default is 50. If the value is negative or exceeds - 1000, the request is rejected. The presence of - ``next_page_token`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Default is 50. If the + value is negative or exceeds 1000, the request + is rejected. The presence of `next_page_token` + in the response indicates that more results + might be available. page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``page_token`` must be the value of ``next_page_token`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `page_token` must be the value of + `next_page_token` from the previous response. + The values of other method parameters should be + identical to those in the previous call. """ resource_names: MutableSequence[str] = proto.RepeatedField( @@ -293,28 +315,31 @@ class ListLogEntriesRequest(proto.Message): class ListLogEntriesResponse(proto.Message): - r"""Result returned from ``ListLogEntries``. + r"""Result returned from `ListLogEntries`. Attributes: entries (MutableSequence[google.cloud.logging_v2.types.LogEntry]): - A list of log entries. If ``entries`` is empty, - ``nextPageToken`` may still be returned, indicating that - more entries may exist. See ``nextPageToken`` for more - information. + A list of log entries. If `entries` is + empty, `nextPageToken` may still be returned, + indicating that more entries may exist. See + `nextPageToken` for more information. next_page_token (str): - If there might be more results than those appearing in this - response, then ``nextPageToken`` is included. To get the - next set of results, call this method again using the value - of ``nextPageToken`` as ``pageToken``. - - If a value for ``next_page_token`` appears and the - ``entries`` field is empty, it means that the search found - no log entries so far but it did not have time to search all - the possible log entries. Retry the method with this value - for ``page_token`` to continue the search. Alternatively, - consider speeding up the search by changing your filter to - specify a single log name or resource type, or to narrow the - time range of the search. + If there might be more results than those + appearing in this response, then `nextPageToken` + is included. To get the next set of results, + call this method again using the value of + `nextPageToken` as `pageToken`. + + If a value for `next_page_token` appears and the + `entries` field is empty, it means that the + search found no log entries so far but it did + not have time to search all the possible log + entries. Retry the method with this value for + `page_token` to continue the search. + Alternatively, consider speeding up the search + by changing your filter to specify a single log + name or resource type, or to narrow the time + range of the search. """ @property @@ -337,16 +362,18 @@ class ListMonitoredResourceDescriptorsRequest(proto.Message): Attributes: page_size (int): - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Non-positive values + are ignored. The presence of `nextPageToken` in + the response indicates that more results might + be available. page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. """ page_size: int = proto.Field( @@ -366,10 +393,11 @@ class ListMonitoredResourceDescriptorsResponse(proto.Message): resource_descriptors (MutableSequence[google.api.monitored_resource_pb2.MonitoredResourceDescriptor]): A list of resource descriptors. next_page_token (str): - If there might be more results than those appearing in this - response, then ``nextPageToken`` is included. To get the - next set of results, call this method again using the value - of ``nextPageToken`` as ``pageToken``. + If there might be more results than those + appearing in this response, then `nextPageToken` + is included. To get the next set of results, + call this method again using the value of + `nextPageToken` as `pageToken`. """ @property @@ -394,38 +422,44 @@ class ListLogsRequest(proto.Message): parent (str): Required. The resource name to list logs for: - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` resource_names (MutableSequence[str]): - Optional. List of resource names to list logs for: - - - ``projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` + Optional. List of resource names to list logs + for: + * + `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` To support legacy queries, it could also be: - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` - The resource name in the ``parent`` field is added to this - list. + The resource name in the `parent` field is added + to this list. page_size (int): - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Non-positive values + are ignored. The presence of `nextPageToken` in + the response indicates that more results might + be available. page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. """ parent: str = proto.Field( @@ -452,13 +486,14 @@ class ListLogsResponse(proto.Message): Attributes: log_names (MutableSequence[str]): A list of log names. For example, - ``"projects/my-project/logs/syslog"`` or - ``"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"``. + `"projects/my-project/logs/syslog"` or + `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. next_page_token (str): - If there might be more results than those appearing in this - response, then ``nextPageToken`` is included. To get the - next set of results, call this method again using the value - of ``nextPageToken`` as ``pageToken``. + If there might be more results than those + appearing in this response, then `nextPageToken` + is included. To get the next set of results, + call this method again using the value of + `nextPageToken` as `pageToken`. """ @property @@ -476,31 +511,35 @@ def raw_page(self): class TailLogEntriesRequest(proto.Message): - r"""The parameters to ``TailLogEntries``. + r"""The parameters to `TailLogEntries`. Attributes: resource_names (MutableSequence[str]): - Required. Name of a parent resource from which to retrieve - log entries: - - - ``projects/[PROJECT_ID]`` - - ``organizations/[ORGANIZATION_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]`` - - ``folders/[FOLDER_ID]`` + Required. Name of a parent resource from + which to retrieve log entries: + * `projects/[PROJECT_ID]` + * `organizations/[ORGANIZATION_ID]` + * `billingAccounts/[BILLING_ACCOUNT_ID]` + * `folders/[FOLDER_ID]` May alternatively be one or more views: - - ``projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` - - ``folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]`` + * + `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` filter (str): - Optional. Only log entries that match the filter are - returned. An empty filter matches all log entries in the - resources listed in ``resource_names``. Referencing a parent - resource that is not listed in ``resource_names`` will cause - the filter to return no results. The maximum length of a - filter is 20,000 characters. + Optional. Only log entries that match the + filter are returned. An empty filter matches + all log entries in the resources listed in + `resource_names`. Referencing a parent resource + that is not listed in `resource_names` will + cause the filter to return no results. The + maximum length of a filter is 20,000 characters. buffer_window (google.protobuf.duration_pb2.Duration): Optional. The amount of time to buffer log entries at the server before being returned to @@ -526,14 +565,14 @@ class TailLogEntriesRequest(proto.Message): class TailLogEntriesResponse(proto.Message): - r"""Result returned from ``TailLogEntries``. + r"""Result returned from `TailLogEntries`. Attributes: entries (MutableSequence[google.cloud.logging_v2.types.LogEntry]): - A list of log entries. Each response in the stream will - order entries with increasing values of - ``LogEntry.timestamp``. Ordering is not guaranteed between - separate responses. + A list of log entries. Each response in the + stream will order entries with increasing values + of `LogEntry.timestamp`. Ordering is not + guaranteed between separate responses. suppression_info (MutableSequence[google.cloud.logging_v2.types.TailLogEntriesResponse.SuppressionInfo]): If entries that otherwise would have been included in the session were not sent back to @@ -553,8 +592,8 @@ class SuppressionInfo(proto.Message): The reason that entries were omitted from the session. suppressed_count (int): - A lower bound on the count of entries omitted due to - ``reason``. + A lower bound on the count of entries omitted + due to `reason`. """ class Reason(proto.Enum): r"""An indicator of why entries were omitted. @@ -563,10 +602,11 @@ class Reason(proto.Enum): REASON_UNSPECIFIED (0): Unexpected default. RATE_LIMIT (1): - Indicates suppression occurred due to relevant entries being - received in excess of rate limits. For quotas and limits, - see `Logging API quotas and - limits `__. + Indicates suppression occurred due to + relevant entries being received in excess of + rate limits. For quotas and limits, see [Logging + API quotas and + limits](https://cloud.google.com/logging/quotas#api-limits). NOT_CONSUMED (2): Indicates suppression occurred due to the client not consuming responses quickly enough. diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging_config.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging_config.py index 292f690774..caadea0bea 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging_config.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging_config.py @@ -172,12 +172,13 @@ class IndexConfig(proto.Message): field_path (str): Required. The LogEntry field path to index. - Note that some paths are automatically indexed, and other - paths are not eligible for indexing. See `indexing - documentation `__ + Note that some paths are automatically indexed, + and other paths are not eligible for indexing. + See [indexing documentation]( + https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) for details. - For example: ``jsonPayload.request.status`` + For example: `jsonPayload.request.status` type_ (google.cloud.logging_v2.types.IndexType): Required. The type of data in this index. create_time (google.protobuf.timestamp_pb2.Timestamp): @@ -212,16 +213,17 @@ class LogBucket(proto.Message): For example: - ``projects/my-project/locations/global/buckets/my-bucket`` + `projects/my-project/locations/global/buckets/my-bucket` - For a list of supported locations, see `Supported - Regions `__ + For a list of supported locations, see + [Supported + Regions](https://cloud.google.com/logging/docs/region-support) - For the location of ``global`` it is unspecified where log - entries are actually stored. + For the location of `global` it is unspecified + where log entries are actually stored. - After a bucket has been created, the location cannot be - changed. + After a bucket has been created, the location + cannot be changed. description (str): Describes this bucket. create_time (google.protobuf.timestamp_pb2.Timestamp): @@ -252,15 +254,17 @@ class LogBucket(proto.Message): Once enabled, log analytics features cannot be disabled. restricted_fields (MutableSequence[str]): - Log entry field paths that are denied access in this bucket. - - The following fields and their children are eligible: - ``textPayload``, ``jsonPayload``, ``protoPayload``, - ``httpRequest``, ``labels``, ``sourceLocation``. - - Restricting a repeated field will restrict all values. - Adding a parent will block all child fields. (e.g. - ``foo.bar`` will block ``foo.bar.baz``) + Log entry field paths that are denied access + in this bucket. + The following fields and their children are + eligible: `textPayload`, `jsonPayload`, + `protoPayload`, `httpRequest`, `labels`, + `sourceLocation`. + + Restricting a repeated field will restrict all + values. Adding a parent will block all child + fields. (e.g. `foo.bar` will block + `foo.bar.baz`) index_configs (MutableSequence[google.cloud.logging_v2.types.IndexConfig]): A list of indexed fields and related configuration data. @@ -334,7 +338,7 @@ class LogView(proto.Message): For example: - ``projects/my-project/locations/global/buckets/my-bucket/views/my-view`` + `projects/my-project/locations/global/buckets/my-bucket/views/my-view` description (str): Describes this view. create_time (google.protobuf.timestamp_pb2.Timestamp): @@ -344,20 +348,22 @@ class LogView(proto.Message): Output only. The last update timestamp of the view. filter (str): - Filter that restricts which log entries in a bucket are - visible in this view. + Filter that restricts which log entries in a + bucket are visible in this view. - Filters are restricted to be a logical AND of ==/!= of any - of the following: + Filters are restricted to be a logical AND of + ==/!= of any of the following: - - originating project/folder/organization/billing account. - - resource type - - log id + - originating + project/folder/organization/billing account. + - resource type + - log id For example: - SOURCE("projects/myproject") AND resource.type = - "gce_instance" AND LOG_ID("stdout") + SOURCE("projects/myproject") AND resource.type + = "gce_instance" + AND LOG_ID("stdout") """ name: str = proto.Field( @@ -397,37 +403,38 @@ class LogSink(proto.Message): Attributes: name (str): - Required. The client-assigned sink identifier, unique within - the project. - - For example: ``"my-syslog-errors-to-pubsub"``. Sink - identifiers are limited to 100 characters and can include - only the following characters: upper and lower-case - alphanumeric characters, underscores, hyphens, and periods. - First character has to be alphanumeric. + Required. The client-assigned sink + identifier, unique within the project. + For example: `"my-syslog-errors-to-pubsub"`. + Sink identifiers are limited to 100 characters + and can include only the following characters: + upper and lower-case alphanumeric characters, + underscores, hyphens, and periods. First + character has to be alphanumeric. destination (str): Required. The export destination: - :: - - "storage.googleapis.com/[GCS_BUCKET]" - "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" + "storage.googleapis.com/[GCS_BUCKET]" + "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - The sink's ``writer_identity``, set when the sink is - created, must have permission to write to the destination or - else the log entries are not exported. For more information, - see `Exporting Logs with - Sinks `__. + The sink's `writer_identity`, set when the sink + is created, must have permission to write to the + destination or else the log entries are not + exported. For more information, see + [Exporting Logs with + Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). filter (str): - Optional. An `advanced logs - filter `__. - The only exported log entries are those that are in the - resource owning the sink and that match the filter. + Optional. An [advanced logs + filter](https://cloud.google.com/logging/docs/view/advanced-queries). + The only exported log entries are those that are + in the resource owning the sink and that match + the filter. For example: - ``logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR`` + `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" + AND severity>=ERROR` description (str): Optional. A description of this sink. @@ -437,55 +444,65 @@ class LogSink(proto.Message): Optional. If set to true, then this sink is disabled and it does not export any log entries. exclusions (MutableSequence[google.cloud.logging_v2.types.LogExclusion]): - Optional. Log entries that match any of these exclusion - filters will not be exported. + Optional. Log entries that match any of these + exclusion filters will not be exported. - If a log entry is matched by both ``filter`` and one of - ``exclusion_filters`` it will not be exported. + If a log entry is matched by both `filter` and + one of `exclusion_filters` it will not be + exported. output_version_format (google.cloud.logging_v2.types.LogSink.VersionFormat): Deprecated. This field is unused. writer_identity (str): - Output only. An IAM identity—a service account or - group—under which Cloud Logging writes the exported log - entries to the sink's destination. This field is either set - by specifying ``custom_writer_identity`` or set + Output only. An IAM identity—a service + account or group—under which Cloud Logging + writes the exported log entries to the sink's + destination. This field is either set by + specifying `custom_writer_identity` or set automatically by [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] - based on the value of ``unique_writer_identity`` in those - methods. - - Until you grant this identity write-access to the - destination, log entry exports from this sink will fail. For - more information, see `Granting Access for a - Resource `__. - Consult the destination service's documentation to determine - the appropriate IAM roles to assign to the identity. - - Sinks that have a destination that is a log bucket in the - same project as the sink cannot have a writer_identity and - no additional permissions are required. + based on the value of `unique_writer_identity` + in those methods. + + Until you grant this identity write-access to + the destination, log entry exports from this + sink will fail. For more information, see + [Granting Access for a + Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + Consult the destination service's documentation + to determine the appropriate IAM roles to assign + to the identity. + + Sinks that have a destination that is a log + bucket in the same project as the sink cannot + have a writer_identity and no additional + permissions are required. include_children (bool): - Optional. This field applies only to sinks owned by - organizations and folders. If the field is false, the - default, only the logs owned by the sink's parent resource - are available for export. If the field is true, then log - entries from all the projects, folders, and billing accounts - contained in the sink's parent resource are also available - for export. Whether a particular log entry from the children - is exported depends on the sink's filter expression. - - For example, if this field is true, then the filter - ``resource.type=gce_instance`` would export all Compute - Engine VM instance log entries from all projects in the - sink's parent. - - To only export entries from certain child projects, filter - on the project part of the log name: - - logName:("projects/test-project1/" OR - "projects/test-project2/") AND resource.type=gce_instance + Optional. This field applies only to sinks + owned by organizations and folders. If the field + is false, the default, only the logs owned by + the sink's parent resource are available for + export. If the field is true, then log entries + from all the projects, folders, and billing + accounts contained in the sink's parent resource + are also available for export. Whether a + particular log entry from the children is + exported depends on the sink's filter + expression. + + For example, if this field is true, then the + filter `resource.type=gce_instance` would export + all Compute Engine VM instance log entries from + all projects in the sink's parent. + + To only export entries from certain child + projects, filter on the project part of the log + name: + + logName:("projects/test-project1/" OR + "projects/test-project2/") AND + resource.type=gce_instance bigquery_options (google.cloud.logging_v2.types.BigQueryOptions): Optional. Options that affect sinks exporting data to BigQuery. @@ -508,9 +525,9 @@ class VersionFormat(proto.Enum): An unspecified format version that will default to V2. V2 (1): - ``LogEntry`` version 2 format. + `LogEntry` version 2 format. V1 (2): - ``LogEntry`` version 1 format. + `LogEntry` version 1 format. """ VERSION_FORMAT_UNSPECIFIED = 0 V2 = 1 @@ -577,9 +594,10 @@ class BigQueryDataset(proto.Message): Attributes: dataset_id (str): - Output only. The full resource name of the BigQuery dataset. - The DATASET_ID will match the ID of the link, so the link - must match the naming restrictions of BigQuery datasets + Output only. The full resource name of the + BigQuery dataset. The DATASET_ID will match the + ID of the link, so the link must match the + naming restrictions of BigQuery datasets (alphanumeric characters and underscores only). The dataset will have a resource path of @@ -597,21 +615,20 @@ class Link(proto.Message): Attributes: name (str): - The resource name of the link. The name can have up to 100 - characters. A valid link id (at the end of the link name) - must only have alphanumeric characters and underscores - within it. + The resource name of the link. The name can + have up to 100 characters. A valid link id (at + the end of the link name) must only have + alphanumeric characters and underscores within + it. - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" For example: - \`projects/my-project/locations/global/buckets/my-bucket/links/my_link + `projects/my-project/locations/global/buckets/my-bucket/links/my_link description (str): Describes this link. @@ -662,25 +679,28 @@ class BigQueryOptions(proto.Message): Attributes: use_partitioned_tables (bool): - Optional. Whether to use `BigQuery's partition - tables `__. - By default, Cloud Logging creates dated tables based on the - log entries' timestamps, e.g. syslog_20170523. With - partitioned tables the date suffix is no longer present and - `special query - syntax `__ - has to be used instead. In both cases, tables are sharded - based on UTC timezone. + Optional. Whether to use [BigQuery's + partition + tables](https://cloud.google.com/bigquery/docs/partitioned-tables). + By default, Cloud Logging creates dated tables + based on the log entries' timestamps, e.g. + syslog_20170523. With partitioned tables the + date suffix is no longer present and [special + query + syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) + has to be used instead. In both cases, tables + are sharded based on UTC timezone. uses_timestamp_column_partitioning (bool): - Output only. True if new timestamp column based partitioning - is in use, false if legacy ingestion-time partitioning is in - use. - - All new sinks will have this field set true and will use - timestamp column based partitioning. If - use_partitioned_tables is false, this value has no meaning - and will be false. Legacy sinks using partitioned tables - will have this field set to false. + Output only. True if new timestamp column + based partitioning is in use, false if legacy + ingestion-time partitioning is in use. + + All new sinks will have this field set true and + will use timestamp column based partitioning. If + use_partitioned_tables is false, this value has + no meaning and will be false. Legacy sinks using + partitioned tables will have this field set to + false. """ use_partitioned_tables: bool = proto.Field( @@ -694,34 +714,33 @@ class BigQueryOptions(proto.Message): class ListBucketsRequest(proto.Message): - r"""The parameters to ``ListBuckets``. + r"""The parameters to `ListBuckets`. Attributes: parent (str): - Required. The parent resource whose buckets are to be - listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - - Note: The locations portion of the resource must be - specified, but supplying the character ``-`` in place of - [LOCATION_ID] will return all buckets. + Required. The parent resource whose buckets + are to be listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + + Note: The locations portion of the resource must + be specified, but supplying the character `-` in + place of [LOCATION_ID] will return all buckets. page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. page_size (int): - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Non-positive values + are ignored. The presence of `nextPageToken` in + the response indicates that more results might + be available. """ parent: str = proto.Field( @@ -745,10 +764,11 @@ class ListBucketsResponse(proto.Message): buckets (MutableSequence[google.cloud.logging_v2.types.LogBucket]): A list of buckets. next_page_token (str): - If there might be more results than appear in this response, - then ``nextPageToken`` is included. To get the next set of - results, call the same method again using the value of - ``nextPageToken`` as ``pageToken``. + If there might be more results than appear in + this response, then `nextPageToken` is included. + To get the next set of results, call the same + method again using the value of `nextPageToken` + as `pageToken`. """ @property @@ -767,24 +787,22 @@ def raw_page(self): class CreateBucketRequest(proto.Message): - r"""The parameters to ``CreateBucket``. + r"""The parameters to `CreateBucket`. Attributes: parent (str): - Required. The resource in which to create the log bucket: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + Required. The resource in which to create the + log bucket: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For example: - ``"projects/my-project/locations/global"`` + `"projects/my-project/locations/global"` bucket_id (str): - Required. A client-assigned identifier such as - ``"my-bucket"``. Identifiers are limited to 100 characters - and can include only letters, digits, underscores, hyphens, - and periods. + Required. A client-assigned identifier such + as `"my-bucket"`. Identifiers are limited to 100 + characters and can include only letters, digits, + underscores, hyphens, and periods. bucket (google.cloud.logging_v2.types.LogBucket): Required. The new bucket. The region specified in the new bucket must be compliant @@ -808,34 +826,34 @@ class CreateBucketRequest(proto.Message): class UpdateBucketRequest(proto.Message): - r"""The parameters to ``UpdateBucket``. + r"""The parameters to `UpdateBucket`. Attributes: name (str): - Required. The full resource name of the bucket to update. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The full resource name of the + bucket to update. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket"`` + `"projects/my-project/locations/global/buckets/my-bucket"` bucket (google.cloud.logging_v2.types.LogBucket): Required. The updated bucket. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Required. Field mask that specifies the fields in ``bucket`` - that need an update. A bucket field will be overwritten if, - and only if, it is in the update mask. ``name`` and output - only fields cannot be updated. + Required. Field mask that specifies the + fields in `bucket` that need an update. A bucket + field will be overwritten if, and only if, it is + in the update mask. `name` and output only + fields cannot be updated. + + For a detailed `FieldMask` definition, see: - For a detailed ``FieldMask`` definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - For example: ``updateMask=retention_days`` + For example: `updateMask=retention_days` """ name: str = proto.Field( @@ -855,22 +873,20 @@ class UpdateBucketRequest(proto.Message): class GetBucketRequest(proto.Message): - r"""The parameters to ``GetBucket``. + r"""The parameters to `GetBucket`. Attributes: name (str): Required. The resource name of the bucket: - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket"`` + `"projects/my-project/locations/global/buckets/my-bucket"` """ name: str = proto.Field( @@ -880,22 +896,20 @@ class GetBucketRequest(proto.Message): class DeleteBucketRequest(proto.Message): - r"""The parameters to ``DeleteBucket``. + r"""The parameters to `DeleteBucket`. Attributes: name (str): - Required. The full resource name of the bucket to delete. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The full resource name of the + bucket to delete. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket"`` + `"projects/my-project/locations/global/buckets/my-bucket"` """ name: str = proto.Field( @@ -905,22 +919,20 @@ class DeleteBucketRequest(proto.Message): class UndeleteBucketRequest(proto.Message): - r"""The parameters to ``UndeleteBucket``. + r"""The parameters to `UndeleteBucket`. Attributes: name (str): - Required. The full resource name of the bucket to undelete. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + Required. The full resource name of the + bucket to undelete. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket"`` + `"projects/my-project/locations/global/buckets/my-bucket"` """ name: str = proto.Field( @@ -930,28 +942,26 @@ class UndeleteBucketRequest(proto.Message): class ListViewsRequest(proto.Message): - r"""The parameters to ``ListViews``. + r"""The parameters to `ListViews`. Attributes: parent (str): - Required. The bucket whose views are to be listed: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". + Required. The bucket whose views are to be + listed: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. page_size (int): - Optional. The maximum number of results to return from this - request. - + Optional. The maximum number of results to + return from this request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + `nextPageToken` in the response indicates that + more results might be available. """ parent: str = proto.Field( @@ -975,10 +985,11 @@ class ListViewsResponse(proto.Message): views (MutableSequence[google.cloud.logging_v2.types.LogView]): A list of views. next_page_token (str): - If there might be more results than appear in this response, - then ``nextPageToken`` is included. To get the next set of - results, call the same method again using the value of - ``nextPageToken`` as ``pageToken``. + If there might be more results than appear in + this response, then `nextPageToken` is included. + To get the next set of results, call the same + method again using the value of `nextPageToken` + as `pageToken`. """ @property @@ -997,24 +1008,22 @@ def raw_page(self): class CreateViewRequest(proto.Message): - r"""The parameters to ``CreateView``. + r"""The parameters to `CreateView`. Attributes: parent (str): - Required. The bucket in which to create the view - - :: - - `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` + Required. The bucket in which to create the + view + `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` For example: - ``"projects/my-project/locations/global/buckets/my-bucket"`` + `"projects/my-project/locations/global/buckets/my-bucket"` view_id (str): - Required. A client-assigned identifier such as - ``"my-view"``. Identifiers are limited to 100 characters and - can include only letters, digits, underscores, hyphens, and - periods. + Required. A client-assigned identifier such + as `"my-view"`. Identifiers are limited to 100 + characters and can include only letters, digits, + underscores, hyphens, and periods. view (google.cloud.logging_v2.types.LogView): Required. The new view. """ @@ -1035,31 +1044,30 @@ class CreateViewRequest(proto.Message): class UpdateViewRequest(proto.Message): - r"""The parameters to ``UpdateView``. + r"""The parameters to `UpdateView`. Attributes: name (str): - Required. The full resource name of the view to update - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + Required. The full resource name of the view + to update + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket/views/my-view"`` + `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` view (google.cloud.logging_v2.types.LogView): Required. The updated view. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask that specifies the fields in ``view`` - that need an update. A field will be overwritten if, and - only if, it is in the update mask. ``name`` and output only - fields cannot be updated. + Optional. Field mask that specifies the + fields in `view` that need an update. A field + will be overwritten if, and only if, it is in + the update mask. `name` and output only fields + cannot be updated. - For a detailed ``FieldMask`` definition, see + For a detailed `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - For example: ``updateMask=filter`` + For example: `updateMask=filter` """ name: str = proto.Field( @@ -1079,19 +1087,17 @@ class UpdateViewRequest(proto.Message): class GetViewRequest(proto.Message): - r"""The parameters to ``GetView``. + r"""The parameters to `GetView`. Attributes: name (str): Required. The resource name of the policy: - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example: - ``"projects/my-project/locations/global/buckets/my-bucket/views/my-view"`` + `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` """ name: str = proto.Field( @@ -1101,21 +1107,17 @@ class GetViewRequest(proto.Message): class DeleteViewRequest(proto.Message): - r"""The parameters to ``DeleteView``. + r"""The parameters to `DeleteView`. Attributes: name (str): - Required. The full resource name of the view to delete: - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + Required. The full resource name of the view + to delete: + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example: - :: - - `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` """ name: str = proto.Field( @@ -1125,29 +1127,29 @@ class DeleteViewRequest(proto.Message): class ListSinksRequest(proto.Message): - r"""The parameters to ``ListSinks``. + r"""The parameters to `ListSinks`. Attributes: parent (str): - Required. The parent resource whose sinks are to be listed: - - :: - + Required. The parent resource whose sinks are + to be listed: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]". page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. page_size (int): - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Non-positive values + are ignored. The presence of `nextPageToken` in + the response indicates that more results might + be available. """ parent: str = proto.Field( @@ -1165,16 +1167,17 @@ class ListSinksRequest(proto.Message): class ListSinksResponse(proto.Message): - r"""Result returned from ``ListSinks``. + r"""Result returned from `ListSinks`. Attributes: sinks (MutableSequence[google.cloud.logging_v2.types.LogSink]): A list of sinks. next_page_token (str): - If there might be more results than appear in this response, - then ``nextPageToken`` is included. To get the next set of - results, call the same method again using the value of - ``nextPageToken`` as ``pageToken``. + If there might be more results than appear in + this response, then `nextPageToken` is included. + To get the next set of results, call the same + method again using the value of `nextPageToken` + as `pageToken`. """ @property @@ -1193,22 +1196,20 @@ def raw_page(self): class GetSinkRequest(proto.Message): - r"""The parameters to ``GetSink``. + r"""The parameters to `GetSink`. Attributes: sink_name (str): Required. The resource name of the sink: - :: - - "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "projects/[PROJECT_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` """ sink_name: str = proto.Field( @@ -1218,14 +1219,12 @@ class GetSinkRequest(proto.Message): class CreateSinkRequest(proto.Message): - r"""The parameters to ``CreateSink``. + r"""The parameters to `CreateSink`. Attributes: parent (str): - Required. The resource in which to create the sink: - - :: - + Required. The resource in which to create the + sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" @@ -1233,25 +1232,29 @@ class CreateSinkRequest(proto.Message): For examples: - ``"projects/my-project"`` ``"organizations/123456789"`` + `"projects/my-project"` + `"organizations/123456789"` sink (google.cloud.logging_v2.types.LogSink): - Required. The new sink, whose ``name`` parameter is a sink - identifier that is not already in use. + Required. The new sink, whose `name` + parameter is a sink identifier that is not + already in use. unique_writer_identity (bool): - Optional. Determines the kind of IAM identity returned as - ``writer_identity`` in the new sink. If this value is - omitted or set to false, and if the sink's parent is a - project, then the value returned as ``writer_identity`` is - the same group or service account used by Cloud Logging - before the addition of writer identities to this API. The - sink's destination must be in the same project as the sink - itself. - - If this field is set to true, or if the sink is owned by a - non-project resource such as an organization, then the value - of ``writer_identity`` will be a unique service account used - only for exports from the new sink. For more information, - see ``writer_identity`` in + Optional. Determines the kind of IAM identity + returned as `writer_identity` in the new sink. + If this value is omitted or set to false, and if + the sink's parent is a project, then the value + returned as `writer_identity` is the same group + or service account used by Cloud Logging before + the addition of writer identities to this API. + The sink's destination must be in the same + project as the sink itself. + + If this field is set to true, or if the sink is + owned by a non-project resource such as an + organization, then the value of + `writer_identity` will be a unique service + account used only for exports from the new sink. + For more information, see `writer_identity` in [LogSink][google.logging.v2.LogSink]. """ @@ -1271,60 +1274,64 @@ class CreateSinkRequest(proto.Message): class UpdateSinkRequest(proto.Message): - r"""The parameters to ``UpdateSink``. + r"""The parameters to `UpdateSink`. Attributes: sink_name (str): - Required. The full resource name of the sink to update, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of the sink + to update, including the parent resource and the + sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` sink (google.cloud.logging_v2.types.LogSink): - Required. The updated sink, whose name is the same - identifier that appears as part of ``sink_name``. + Required. The updated sink, whose name is the + same identifier that appears as part of + `sink_name`. unique_writer_identity (bool): Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - for a description of this field. When updating a sink, the - effect of this field on the value of ``writer_identity`` in - the updated sink depends on both the old and new values of - this field: - - - If the old and new values of this field are both false or - both true, then there is no change to the sink's - ``writer_identity``. - - If the old value is false and the new value is true, then - ``writer_identity`` is changed to a unique service - account. - - It is an error if the old value is true and the new value - is set to false or defaulted to false. + for a description of this field. When updating a + sink, the effect of this field on the value of + `writer_identity` in the updated sink depends on + both the old and new values of this field: + + + If the old and new values of this field are + both false or both true, then there is no + change to the sink's `writer_identity`. + + If the old value is false and the new value + is true, then `writer_identity` is changed + to a unique service account. + + It is an error if the old value is true and + the new value is set to false or defaulted + to false. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask that specifies the fields in ``sink`` - that need an update. A sink field will be overwritten if, - and only if, it is in the update mask. ``name`` and output - only fields cannot be updated. + Optional. Field mask that specifies the + fields in `sink` that need an update. A sink + field will be overwritten if, and only if, it is + in the update mask. `name` and output only + fields cannot be updated. - An empty ``updateMask`` is temporarily treated as using the - following mask for backwards compatibility purposes: + An empty `updateMask` is temporarily treated as + using the following mask for backwards + compatibility purposes: - ``destination,filter,includeChildren`` + `destination,filter,includeChildren` - At some point in the future, behavior will be removed and - specifying an empty ``updateMask`` will be an error. + At some point in the future, behavior will be + removed and specifying an empty `updateMask` + will be an error. - For a detailed ``FieldMask`` definition, see + For a detailed `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - For example: ``updateMask=filter`` + For example: `updateMask=filter` """ sink_name: str = proto.Field( @@ -1348,23 +1355,22 @@ class UpdateSinkRequest(proto.Message): class DeleteSinkRequest(proto.Message): - r"""The parameters to ``DeleteSink``. + r"""The parameters to `DeleteSink`. Attributes: sink_name (str): - Required. The full resource name of the sink to delete, - including the parent resource and the sink identifier: - - :: + Required. The full resource name of the sink + to delete, including the parent resource and the + sink identifier: "projects/[PROJECT_ID]/sinks/[SINK_ID]" - "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - "folders/[FOLDER_ID]/sinks/[SINK_ID]" + "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + "folders/[FOLDER_ID]/sinks/[SINK_ID]" For example: - ``"projects/my-project/sinks/my-sink"`` + `"projects/my-project/sinks/my-sink"` """ sink_name: str = proto.Field( @@ -1378,21 +1384,19 @@ class CreateLinkRequest(proto.Message): Attributes: parent (str): - Required. The full resource name of the bucket to create a - link for. - - :: - - "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". + Required. The full resource name of the + bucket to create a link for. + "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". link (google.cloud.logging_v2.types.Link): Required. The new link. link_id (str): - Required. The ID to use for the link. The link_id can have - up to 100 characters. A valid link_id must only have - alphanumeric characters and underscores within it. + Required. The ID to use for the link. The + link_id can have up to 100 characters. A valid + link_id must only have alphanumeric characters + and underscores within it. """ parent: str = proto.Field( @@ -1415,8 +1419,8 @@ class DeleteLinkRequest(proto.Message): Attributes: name (str): - Required. The full resource name of the link to delete. - + Required. The full resource name of the link + to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" @@ -1434,17 +1438,17 @@ class ListLinksRequest(proto.Message): Attributes: parent (str): - Required. The parent resource whose links are to be listed: - + Required. The parent resource whose links are + to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. page_size (int): Optional. The maximum number of results to return from this request. @@ -1471,10 +1475,11 @@ class ListLinksResponse(proto.Message): links (MutableSequence[google.cloud.logging_v2.types.Link]): A list of links. next_page_token (str): - If there might be more results than those appearing in this - response, then ``nextPageToken`` is included. To get the - next set of results, call the same method again using the - value of ``nextPageToken`` as ``pageToken``. + If there might be more results than those + appearing in this response, then `nextPageToken` + is included. To get the next set of results, + call the same method again using the value of + `nextPageToken` as `pageToken`. """ @property @@ -1512,37 +1517,42 @@ class GetLinkRequest(proto.Message): class LogExclusion(proto.Message): - r"""Specifies a set of log entries that are filtered out by a sink. If - your Google Cloud resource receives a large volume of log entries, - you can use exclusions to reduce your chargeable logs. Note that - exclusions on organization-level and folder-level sinks don't apply - to child resources. Note also that you cannot modify the \_Required - sink or exclude logs from it. + r"""Specifies a set of log entries that are filtered out by a + sink. If your Google Cloud resource receives a large volume of + log entries, you can use exclusions to reduce your chargeable + logs. Note that exclusions on organization-level and + folder-level sinks don't apply to child resources. Note also + that you cannot modify the _Required sink or exclude logs from + it. Attributes: name (str): - Required. A client-assigned identifier, such as - ``"load-balancer-exclusion"``. Identifiers are limited to - 100 characters and can include only letters, digits, - underscores, hyphens, and periods. First character has to be - alphanumeric. + Required. A client-assigned identifier, such + as `"load-balancer-exclusion"`. Identifiers are + limited to 100 characters and can include only + letters, digits, underscores, hyphens, and + periods. First character has to be alphanumeric. description (str): Optional. A description of this exclusion. filter (str): - Required. An `advanced logs - filter `__ - that matches the log entries to be excluded. By using the - `sample - function `__, - you can exclude less than 100% of the matching log entries. - - For example, the following query matches 99% of low-severity - log entries from Google Cloud Storage buckets: - - ``resource.type=gcs_bucket severity`__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Attributes: name (str): - Required. The resource for which to retrieve CMEK settings. - - :: - + Required. The resource for which to retrieve + CMEK settings. "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" For example: - ``"organizations/12345/cmekSettings"`` + `"organizations/12345/cmekSettings"` - Note: CMEK for the Log Router can be configured for Google - Cloud projects, folders, organizations and billing accounts. - Once configured for an organization, it applies to all - projects and folders in the Google Cloud organization. + Note: CMEK for the Log Router can be configured + for Google Cloud projects, folders, + organizations and billing accounts. Once + configured for an organization, it applies to + all projects and folders in the Google Cloud + organization. """ name: str = proto.Field( @@ -1829,45 +1832,44 @@ class UpdateCmekSettingsRequest(proto.Message): r"""The parameters to [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Attributes: name (str): - Required. The resource name for the CMEK settings to update. - - :: - + Required. The resource name for the CMEK + settings to update. "projects/[PROJECT_ID]/cmekSettings" - "organizations/[ORGANIZATION_ID]/cmekSettings" - "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - "folders/[FOLDER_ID]/cmekSettings" + "organizations/[ORGANIZATION_ID]/cmekSettings" + "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + "folders/[FOLDER_ID]/cmekSettings" For example: - ``"organizations/12345/cmekSettings"`` + `"organizations/12345/cmekSettings"` - Note: CMEK for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, - it applies to all projects and folders in the Google Cloud - organization. + Note: CMEK for the Log Router can currently only + be configured for Google Cloud organizations. + Once configured, it applies to all projects and + folders in the Google Cloud organization. cmek_settings (google.cloud.logging_v2.types.CmekSettings): Required. The CMEK settings to update. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask identifying which fields from - ``cmek_settings`` should be updated. A field will be - overwritten if and only if it is in the update mask. Output - only fields cannot be updated. + Optional. Field mask identifying which fields + from `cmek_settings` should be updated. A field + will be overwritten if and only if it is in the + update mask. Output only fields cannot be + updated. - See [FieldMask][google.protobuf.FieldMask] for more - information. + See [FieldMask][google.protobuf.FieldMask] for + more information. - For example: ``"updateMask=kmsKeyName"`` + For example: `"updateMask=kmsKeyName"` """ name: str = proto.Field( @@ -1888,15 +1890,15 @@ class UpdateCmekSettingsRequest(proto.Message): class CmekSettings(proto.Message): r"""Describes the customer-managed encryption key (CMEK) settings - associated with a project, folder, organization, billing account, or - flexible resource. + associated with a project, folder, organization, billing + account, or flexible resource. - Note: CMEK for the Log Router can currently only be configured for - Google Cloud organizations. Once configured, it applies to all - projects and folders in the Google Cloud organization. + Note: CMEK for the Log Router can currently only be configured + for Google Cloud organizations. Once configured, it applies to + all projects and folders in the Google Cloud organization. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Attributes: @@ -1904,72 +1906,72 @@ class CmekSettings(proto.Message): Output only. The resource name of the CMEK settings. kms_key_name (str): - The resource name for the configured Cloud KMS key. - + The resource name for the configured Cloud + KMS key. KMS key name format: - :: - - "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" For example: - ``"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`` + `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - To enable CMEK for the Log Router, set this field to a valid - ``kms_key_name`` for which the associated service account - has the required cloudkms.cryptoKeyEncrypterDecrypter roles + To enable CMEK for the Log Router, set this + field to a valid `kms_key_name` for which the + associated service account has the required + cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. - The Cloud KMS key used by the Log Router can be updated by - changing the ``kms_key_name`` to a new valid key name or - disabled by setting the key name to an empty string. - Encryption operations that are in progress will be completed - with the key that was in use when they started. Decryption - operations will be completed using the key that was used at - the time of encryption unless access to that key has been - revoked. - - To disable CMEK for the Log Router, set this field to an - empty string. - - See `Enabling CMEK for Log - Router `__ + The Cloud KMS key used by the Log Router can be + updated by changing the `kms_key_name` to a new + valid key name or disabled by setting the key + name to an empty string. Encryption operations + that are in progress will be completed with the + key that was in use when they started. + Decryption operations will be completed using + the key that was used at the time of encryption + unless access to that key has been revoked. + + To disable CMEK for the Log Router, set this + field to an empty string. + + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. kms_key_version_name (str): - The CryptoKeyVersion resource name for the configured Cloud - KMS key. - + The CryptoKeyVersion resource name for the + configured Cloud KMS key. KMS key name format: - :: - - "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" + "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" For example: - ``"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"`` + `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` - This is a read-only field used to convey the specific - configured CryptoKeyVersion of ``kms_key`` that has been - configured. It will be populated in cases where the CMEK - settings are bound to a single key version. + This is a read-only field used to convey the + specific configured CryptoKeyVersion of + `kms_key` that has been configured. It will be + populated in cases where the CMEK settings are + bound to a single key version. - If this field is populated, the ``kms_key`` is tied to a - specific CryptoKeyVersion. + If this field is populated, the `kms_key` is + tied to a specific CryptoKeyVersion. service_account_id (str): - Output only. The service account that will be used by the - Log Router to access your Cloud KMS key. + Output only. The service account that will be + used by the Log Router to access your Cloud KMS + key. - Before enabling CMEK for Log Router, you must first assign - the cloudkms.cryptoKeyEncrypterDecrypter role to the service - account that the Log Router will use to access your Cloud - KMS key. Use + Before enabling CMEK for Log Router, you must + first assign the + cloudkms.cryptoKeyEncrypterDecrypter role to the + service account that the Log Router will use to + access your Cloud KMS key. Use [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to obtain the service account ID. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. """ @@ -1995,29 +1997,28 @@ class GetSettingsRequest(proto.Message): r"""The parameters to [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Attributes: name (str): - Required. The resource for which to retrieve settings. - - :: - + Required. The resource for which to retrieve + settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" - "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - "folders/[FOLDER_ID]/settings" + "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + "folders/[FOLDER_ID]/settings" For example: - ``"organizations/12345/settings"`` + `"organizations/12345/settings"` - Note: Settings for the Log Router can be get for Google - Cloud projects, folders, organizations and billing accounts. - Currently it can only be configured for organizations. Once - configured for an organization, it applies to all projects + Note: Settings for the Log Router can be get for + Google Cloud projects, folders, organizations + and billing accounts. Currently it can only be + configured for organizations. Once configured + for an organization, it applies to all projects and folders in the Google Cloud organization. """ @@ -2031,42 +2032,42 @@ class UpdateSettingsRequest(proto.Message): r"""The parameters to [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings]. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. Attributes: name (str): - Required. The resource name for the settings to update. - - :: - + Required. The resource name for the settings + to update. "organizations/[ORGANIZATION_ID]/settings" For example: - ``"organizations/12345/settings"`` + `"organizations/12345/settings"` - Note: Settings for the Log Router can currently only be - configured for Google Cloud organizations. Once configured, - it applies to all projects and folders in the Google Cloud + Note: Settings for the Log Router can currently + only be configured for Google Cloud + organizations. Once configured, it applies to + all projects and folders in the Google Cloud organization. settings (google.cloud.logging_v2.types.Settings): Required. The settings to update. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Optional. Field mask identifying which fields from - ``settings`` should be updated. A field will be overwritten - if and only if it is in the update mask. Output only fields - cannot be updated. + Optional. Field mask identifying which fields + from `settings` should be updated. A field will + be overwritten if and only if it is in the + update mask. Output only fields cannot be + updated. - See [FieldMask][google.protobuf.FieldMask] for more - information. + See [FieldMask][google.protobuf.FieldMask] for + more information. - For example: ``"updateMask=kmsKeyName"`` + For example: `"updateMask=kmsKeyName"` """ name: str = proto.Field( @@ -2094,64 +2095,66 @@ class Settings(proto.Message): Output only. The resource name of the settings. kms_key_name (str): - Optional. The resource name for the configured Cloud KMS - key. - + Optional. The resource name for the + configured Cloud KMS key. KMS key name format: - :: - - "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" For example: - ``"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`` + `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - To enable CMEK for the Log Router, set this field to a valid - ``kms_key_name`` for which the associated service account - has the required - ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned - for the key. + To enable CMEK for the Log Router, set this + field to a valid `kms_key_name` for which the + associated service account has the required + `roles/cloudkms.cryptoKeyEncrypterDecrypter` + role assigned for the key. - The Cloud KMS key used by the Log Router can be updated by - changing the ``kms_key_name`` to a new valid key name. - Encryption operations that are in progress will be completed - with the key that was in use when they started. Decryption - operations will be completed using the key that was used at - the time of encryption unless access to that key has been - revoked. + The Cloud KMS key used by the Log Router can be + updated by changing the `kms_key_name` to a new + valid key name. Encryption operations that are + in progress will be completed with the key that + was in use when they started. Decryption + operations will be completed using the key that + was used at the time of encryption unless access + to that key has been revoked. - To disable CMEK for the Log Router, set this field to an - empty string. + To disable CMEK for the Log Router, set this + field to an empty string. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. kms_service_account_id (str): - Output only. The service account that will be used by the - Log Router to access your Cloud KMS key. + Output only. The service account that will be + used by the Log Router to access your Cloud KMS + key. - Before enabling CMEK for Log Router, you must first assign - the role ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` to - the service account that the Log Router will use to access - your Cloud KMS key. Use + Before enabling CMEK for Log Router, you must + first assign the role + `roles/cloudkms.cryptoKeyEncrypterDecrypter` to + the service account that the Log Router will use + to access your Cloud KMS key. Use [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to obtain the service account ID. - See `Enabling CMEK for Log - Router `__ + See [Enabling CMEK for Log + Router](https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. storage_location (str): - Optional. The Cloud region that will be used for \_Default - and \_Required log buckets for newly created projects and - folders. For example ``europe-west1``. This setting does not - affect the location of custom log buckets. + Optional. The Cloud region that will be used + for _Default and _Required log buckets for newly + created projects and folders. For example + `europe-west1`. This setting does not affect the + location of custom log buckets. disable_default_sink (bool): - Optional. If set to true, the \_Default sink in newly - created projects and folders will created in a disabled - state. This can be used to automatically disable log - ingestion if there is already an aggregated sink configured - in the hierarchy. The \_Default sink can be re-enabled + Optional. If set to true, the _Default sink + in newly created projects and folders will + created in a disabled state. This can be used to + automatically disable log ingestion if there is + already an aggregated sink configured in the + hierarchy. The _Default sink can be re-enabled manually if needed. """ @@ -2182,11 +2185,11 @@ class CopyLogEntriesRequest(proto.Message): Attributes: name (str): - Required. Log bucket from which to copy log entries. - + Required. Log bucket from which to copy log + entries. For example: - ``"projects/my-project/locations/global/buckets/my-source-bucket"`` + `"projects/my-project/locations/global/buckets/my-source-bucket"` filter (str): Optional. A filter specifying which log entries to copy. The filter must be no more than @@ -2230,13 +2233,14 @@ class CopyLogEntriesMetadata(proto.Message): Estimated progress of the operation (0 - 100%). writer_identity (str): - The IAM identity of a service account that must be granted - access to the destination. + The IAM identity of a service account that + must be granted access to the destination. - If the service account is not granted permission to the - destination within an hour, the operation will be cancelled. + If the service account is not granted permission + to the destination within an hour, the operation + will be cancelled. - For example: ``"serviceAccount:foo@bar.com"`` + For example: `"serviceAccount:foo@bar.com"` """ start_time: timestamp_pb2.Timestamp = proto.Field( diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging_metrics.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging_metrics.py index d26267d8cf..5027b14d4a 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging_metrics.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/types/logging_metrics.py @@ -51,122 +51,137 @@ class LogMetric(proto.Message): Attributes: name (str): - Required. The client-assigned metric identifier. Examples: - ``"error_count"``, ``"nginx/requests"``. - - Metric identifiers are limited to 100 characters and can - include only the following characters: ``A-Z``, ``a-z``, - ``0-9``, and the special characters ``_-.,+!*',()%/``. The - forward-slash character (``/``) denotes a hierarchy of name - pieces, and it cannot be the first character of the name. - - This field is the ``[METRIC_ID]`` part of a metric resource - name in the format - "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the - resource name of a metric is - ``"projects/my-project/metrics/nginx%2Frequests"``, this - field's value is ``"nginx/requests"``. + Required. The client-assigned metric + identifier. Examples: `"error_count"`, + `"nginx/requests"`. + + Metric identifiers are limited to 100 characters + and can include only the following characters: + `A-Z`, `a-z`, `0-9`, and the special characters + `_-.,+!*',()%/`. The forward-slash character + (`/`) denotes a hierarchy of name pieces, and it + cannot be the first character of the name. + + This field is the `[METRIC_ID]` part of a metric + resource name in the format + "projects/[PROJECT_ID]/metrics/[METRIC_ID]". + Example: If the resource name of a metric is + `"projects/my-project/metrics/nginx%2Frequests"`, + this field's value is `"nginx/requests"`. description (str): Optional. A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. filter (str): - Required. An `advanced logs - filter `__ + Required. An [advanced logs + filter](https://cloud.google.com/logging/docs/view/advanced_filters) which is used to match log entries. Example: - :: - "resource.type=gae_app AND severity>=ERROR" - The maximum length of the filter is 20000 characters. + The maximum length of the filter is 20000 + characters. bucket_name (str): - Optional. The resource name of the Log Bucket that owns the - Log Metric. Only Log Buckets in projects are supported. The - bucket has to be in the same project as the metric. + Optional. The resource name of the Log Bucket + that owns the Log Metric. Only Log Buckets in + projects are supported. The bucket has to be in + the same project as the metric. For example: - ``projects/my-project/locations/global/buckets/my-bucket`` + `projects/my-project/locations/global/buckets/my-bucket` - If empty, then the Log Metric is considered a non-Bucket Log - Metric. + If empty, then the Log Metric is considered a + non-Bucket Log Metric. disabled (bool): Optional. If set to True, then this metric is disabled and it does not generate any points. metric_descriptor (google.api.metric_pb2.MetricDescriptor): - Optional. The metric descriptor associated with the - logs-based metric. If unspecified, it uses a default metric - descriptor with a DELTA metric kind, INT64 value type, with - no labels and a unit of "1". Such a metric counts the number - of log entries matching the ``filter`` expression. - - The ``name``, ``type``, and ``description`` fields in the - ``metric_descriptor`` are output only, and is constructed - using the ``name`` and ``description`` field in the + Optional. The metric descriptor associated + with the logs-based metric. If unspecified, it + uses a default metric descriptor with a DELTA + metric kind, INT64 value type, with no labels + and a unit of "1". Such a metric counts the + number of log entries matching the `filter` + expression. + + The `name`, `type`, and `description` fields in + the `metric_descriptor` are output only, and is + constructed using the `name` and `description` + field in the LogMetric. + + To create a logs-based metric that records a + distribution of log values, a DELTA metric kind + with a DISTRIBUTION value type must be used + along with a `value_extractor` expression in the LogMetric. - To create a logs-based metric that records a distribution of - log values, a DELTA metric kind with a DISTRIBUTION value - type must be used along with a ``value_extractor`` - expression in the LogMetric. - - Each label in the metric descriptor must have a matching - label name as the key and an extractor expression as the - value in the ``label_extractors`` map. + Each label in the metric descriptor must have a + matching label name as the key and an extractor + expression as the value in the + `label_extractors` map. - The ``metric_kind`` and ``value_type`` fields in the - ``metric_descriptor`` cannot be updated once initially - configured. New labels can be added in the - ``metric_descriptor``, but existing labels cannot be - modified except for their description. + The `metric_kind` and `value_type` fields in the + `metric_descriptor` cannot be updated once + initially configured. New labels can be added in + the `metric_descriptor`, but existing labels + cannot be modified except for their description. value_extractor (str): - Optional. A ``value_extractor`` is required when using a - distribution logs-based metric to extract the values to - record from a log entry. Two functions are supported for - value extraction: ``EXTRACT(field)`` or - ``REGEXP_EXTRACT(field, regex)``. The arguments are: - - 1. field: The name of the log entry field from which the - value is to be extracted. - 2. regex: A regular expression using the Google RE2 syntax - (https://github.com/google/re2/wiki/Syntax) with a single - capture group to extract data from the specified log - entry field. The value of the field is converted to a - string before applying the regex. It is an error to - specify a regex that does not include exactly one capture - group. - - The result of the extraction must be convertible to a double - type, as the distribution always records double values. If - either the extraction or the conversion to double fails, - then those values are not recorded in the distribution. - - Example: - ``REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")`` + Optional. A `value_extractor` is required + when using a distribution logs-based metric to + extract the values to record from a log entry. + Two functions are supported for value + extraction: `EXTRACT(field)` or + `REGEXP_EXTRACT(field, regex)`. The arguments + are: + + 1. field: The name of the log entry field from + which the value is to be extracted. + 2. regex: A regular expression using the + Google RE2 syntax + (https://github.com/google/re2/wiki/Syntax) + with a single capture group to extract + data from the specified log entry field. The + value of the field is converted to a + string before applying the regex. It is + an error to specify a regex that does not + include exactly one capture group. + + The result of the extraction must be convertible + to a double type, as the distribution always + records double values. If either the extraction + or the conversion to double fails, then those + values are not recorded in the distribution. + + Example: `REGEXP_EXTRACT(jsonPayload.request, + ".*quantity=(\d+).*")` label_extractors (MutableMapping[str, str]): - Optional. A map from a label key string to an extractor - expression which is used to extract data from a log entry - field and assign as the label value. Each label key - specified in the LabelDescriptor must have an associated - extractor expression in this map. The syntax of the - extractor expression is the same as for the - ``value_extractor`` field. - - The extracted value is converted to the type defined in the - label descriptor. If either the extraction or the type - conversion fails, the label will have a default value. The - default value for a string label is an empty string, for an - integer label its 0, and for a boolean label its ``false``. - - Note that there are upper bounds on the maximum number of - labels and the number of active time series that are allowed - in a project. + Optional. A map from a label key string to an + extractor expression which is used to extract + data from a log entry field and assign as the + label value. Each label key specified in the + LabelDescriptor must have an associated + extractor expression in this map. The syntax of + the extractor expression is the same as for the + `value_extractor` field. + + The extracted value is converted to the type + defined in the label descriptor. If either the + extraction or the type conversion fails, the + label will have a default value. The default + value for a string label is an empty string, for + an integer label its 0, and for a boolean label + its `false`. + + Note that there are upper bounds on the maximum + number of labels and the number of active time + series that are allowed in a project. bucket_options (google.api.distribution_pb2.BucketOptions): - Optional. The ``bucket_options`` are required when the - logs-based metric is using a DISTRIBUTION value type and it - describes the bucket boundaries used to create a histogram - of the extracted values. + Optional. The `bucket_options` are required + when the logs-based metric is using a + DISTRIBUTION value type and it describes the + bucket boundaries used to create a histogram of + the extracted values. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The creation timestamp of the metric. @@ -253,22 +268,22 @@ class ListLogMetricsRequest(proto.Message): Attributes: parent (str): - Required. The name of the project containing the metrics: - - :: - + Required. The name of the project containing + the metrics: "projects/[PROJECT_ID]". page_token (str): - Optional. If present, then retrieve the next batch of - results from the preceding call to this method. - ``pageToken`` must be the value of ``nextPageToken`` from - the previous response. The values of other method parameters - should be identical to those in the previous call. + Optional. If present, then retrieve the next + batch of results from the preceding call to this + method. `pageToken` must be the value of + `nextPageToken` from the previous response. The + values of other method parameters should be + identical to those in the previous call. page_size (int): - Optional. The maximum number of results to return from this - request. Non-positive values are ignored. The presence of - ``nextPageToken`` in the response indicates that more - results might be available. + Optional. The maximum number of results to + return from this request. Non-positive values + are ignored. The presence of `nextPageToken` in + the response indicates that more results might + be available. """ parent: str = proto.Field( @@ -292,10 +307,11 @@ class ListLogMetricsResponse(proto.Message): metrics (MutableSequence[google.cloud.logging_v2.types.LogMetric]): A list of logs-based metrics. next_page_token (str): - If there might be more results than appear in this response, - then ``nextPageToken`` is included. To get the next set of - results, call this method again using the value of - ``nextPageToken`` as ``pageToken``. + If there might be more results than appear in + this response, then `nextPageToken` is included. + To get the next set of results, call this method + again using the value of `nextPageToken` as + `pageToken`. """ @property @@ -318,10 +334,8 @@ class GetLogMetricRequest(proto.Message): Attributes: metric_name (str): - Required. The resource name of the desired metric: - - :: - + Required. The resource name of the desired + metric: "projects/[PROJECT_ID]/metrics/[METRIC_ID]". """ @@ -336,11 +350,8 @@ class CreateLogMetricRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the project in which to - create the metric: - - :: - + Required. The resource name of the project in + which to create the metric: "projects/[PROJECT_ID]" The new metric must be provided in the request. @@ -365,16 +376,14 @@ class UpdateLogMetricRequest(proto.Message): Attributes: metric_name (str): - Required. The resource name of the metric to update: - - :: - + Required. The resource name of the metric to + update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - The updated metric must be provided in the request and it's - ``name`` field must be the same as ``[METRIC_ID]`` If the - metric does not exist in ``[PROJECT_ID]``, then a new metric - is created. + The updated metric must be provided in the + request and it's `name` field must be the same + as `[METRIC_ID]` If the metric does not exist in + `[PROJECT_ID]`, then a new metric is created. metric (google.cloud.logging_v2.types.LogMetric): Required. The updated metric. """ @@ -395,10 +404,8 @@ class DeleteLogMetricRequest(proto.Message): Attributes: metric_name (str): - Required. The resource name of the metric to delete: - - :: - + Required. The resource name of the metric to + delete: "projects/[PROJECT_ID]/metrics/[METRIC_ID]". """ diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py index ea3e960a8e..e08cee7bd5 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py @@ -60,23 +60,23 @@ class CloudRedisAsyncClient: Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` """ _client: CloudRedisClient @@ -286,16 +286,16 @@ async def list_instances(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListInstancesAsyncPager: - r"""Lists all Redis instances owned by a project in either the - specified location (region) or all locations. + r"""Lists all Redis instances owned by a project in + either the specified location (region) or all locations. The location should have the following format: - - ``projects/{project_id}/locations/{location_id}`` + * `projects/{project_id}/locations/{location_id}` - If ``location_id`` is specified as ``-`` (wildcard), then all - regions available to the project are queried, and the results - are aggregated. + If `location_id` is specified as `-` (wildcard), then + all regions available to the project are queried, and + the results are aggregated. .. code-block:: python @@ -329,10 +329,11 @@ async def sample_list_instances(): The request object. Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. parent (:class:`str`): - Required. The resource name of the instance location - using the form: - ``projects/{project_id}/locations/{location_id}`` where - ``location_id`` refers to a GCP region. + Required. The resource name of the + instance location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -349,9 +350,9 @@ async def sample_list_instances(): google.cloud.redis_v1.services.cloud_redis.pagers.ListInstancesAsyncPager: Response for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. - - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -451,9 +452,11 @@ async def sample_get_instance(): The request object. Request for [GetInstance][google.cloud.redis.v1.CloudRedis.GetInstance]. name (:class:`str`): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -559,9 +562,11 @@ async def sample_get_instance_auth_string(): The request object. Request for [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString]. name (:class:`str`): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -633,20 +638,20 @@ async def create_instance(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a Redis instance based on the specified tier and memory - size. + r"""Creates a Redis instance based on the specified tier + and memory size. + By default, the instance is accessible from the + project's [default + network](https://cloud.google.com/vpc/docs/vpc). + + The creation is executed asynchronously and callers may + check the returned operation to track its progress. Once + the operation is completed the Redis instance will be + fully functional. Completed longrunning.Operation will + contain the new instance object in the response field. - By default, the instance is accessible from the project's - `default network `__. - - The creation is executed asynchronously and callers may check - the returned operation to track its progress. Once the operation - is completed the Redis instance will be fully functional. - Completed longrunning.Operation will contain the new instance - object in the response field. - - The returned operation is automatically deleted after a few - hours, so there is no need to call DeleteOperation. + The returned operation is automatically deleted after a + few hours, so there is no need to call DeleteOperation. .. code-block:: python @@ -690,24 +695,27 @@ async def sample_create_instance(): The request object. Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. parent (:class:`str`): - Required. The resource name of the instance location - using the form: - ``projects/{project_id}/locations/{location_id}`` where - ``location_id`` refers to a GCP region. + Required. The resource name of the + instance location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. instance_id (:class:`str`): - Required. The logical name of the Redis instance in the - customer project with the following restrictions: - - - Must contain only lowercase letters, numbers, and - hyphens. - - Must start with a letter. - - Must be between 1-40 characters. - - Must end with a number or a letter. - - Must be unique within the customer project / location + Required. The logical name of the + Redis instance in the customer project + with the following restrictions: + + * Must contain only lowercase letters, + numbers, and hyphens. * Must start with + a letter. + * Must be between 1-40 characters. + * Must end with a number or a letter. + * Must be unique within the customer + project / location This corresponds to the ``instance_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -727,11 +735,12 @@ async def sample_create_instance(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -847,23 +856,26 @@ async def sample_update_instance(): The request object. Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Required. Mask of fields to update. At least one path - must be supplied in this field. The elements of the - repeated paths field may only include these fields from + Required. Mask of fields to update. + At least one path must be supplied in + this field. The elements of the repeated + paths field may only include these + fields from [Instance][google.cloud.redis.v1.Instance]: - - ``displayName`` - - ``labels`` - - ``memorySizeGb`` - - ``redisConfig`` - - ``replica_count`` + * `displayName` + * `labels` + * `memorySizeGb` + * `redisConfig` + * `replica_count` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. instance (:class:`google.cloud.redis_v1.types.Instance`): - Required. Update description. Only fields specified in - update_mask are updated. + Required. Update description. + Only fields specified in update_mask are + updated. This corresponds to the ``instance`` field on the ``request`` instance; if ``request`` is provided, this @@ -878,11 +890,12 @@ async def sample_update_instance(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -988,9 +1001,11 @@ async def sample_upgrade_instance(): The request object. Request for [UpgradeInstance][google.cloud.redis.v1.CloudRedis.UpgradeInstance]. name (:class:`str`): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1012,11 +1027,12 @@ async def sample_upgrade_instance(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1132,9 +1148,11 @@ async def sample_import_instance(): The request object. Request for [Import][google.cloud.redis.v1.CloudRedis.ImportInstance]. name (:class:`str`): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1156,11 +1174,12 @@ async def sample_import_instance(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1273,9 +1292,11 @@ async def sample_export_instance(): The request object. Request for [Export][google.cloud.redis.v1.CloudRedis.ExportInstance]. name (:class:`str`): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1297,11 +1318,12 @@ async def sample_export_instance(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1407,17 +1429,20 @@ async def sample_failover_instance(): The request object. Request for [Failover][google.cloud.redis.v1.CloudRedis.FailoverInstance]. name (:class:`str`): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. data_protection_mode (:class:`google.cloud.redis_v1.types.FailoverInstanceRequest.DataProtectionMode`): - Optional. Available data protection modes that the user - can choose. If it's unspecified, data protection mode - will be LIMITED_DATA_LOSS by default. + Optional. Available data protection + modes that the user can choose. If it's + unspecified, data protection mode will + be LIMITED_DATA_LOSS by default. This corresponds to the ``data_protection_mode`` field on the ``request`` instance; if ``request`` is provided, this @@ -1432,11 +1457,12 @@ async def sample_failover_instance(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1540,9 +1566,11 @@ async def sample_delete_instance(): The request object. Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. name (:class:`str`): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1557,18 +1585,21 @@ async def sample_delete_instance(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -1673,24 +1704,29 @@ async def sample_reschedule_maintenance(): The request object. Request for [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance]. name (:class:`str`): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. reschedule_type (:class:`google.cloud.redis_v1.types.RescheduleMaintenanceRequest.RescheduleType`): - Required. If reschedule type is SPECIFIC_TIME, must set - up schedule_time as well. + Required. If reschedule type is + SPECIFIC_TIME, must set up schedule_time + as well. This corresponds to the ``reschedule_type`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schedule_time (:class:`google.protobuf.timestamp_pb2.Timestamp`): - Optional. Timestamp when the maintenance shall be - rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC - 3339 format, for example ``2012-11-15T16:19:00.094Z``. + Optional. Timestamp when the + maintenance shall be rescheduled to if + reschedule_type=SPECIFIC_TIME, in RFC + 3339 format, for example + `2012-11-15T16:19:00.094Z`. This corresponds to the ``schedule_time`` field on the ``request`` instance; if ``request`` is provided, this @@ -1705,11 +1741,12 @@ async def sample_reschedule_maintenance(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py index e02ecf33f1..fa1eb63274 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py @@ -111,23 +111,23 @@ class CloudRedisClient(metaclass=CloudRedisClientMeta): Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` """ @staticmethod @@ -667,16 +667,16 @@ def list_instances(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListInstancesPager: - r"""Lists all Redis instances owned by a project in either the - specified location (region) or all locations. + r"""Lists all Redis instances owned by a project in + either the specified location (region) or all locations. The location should have the following format: - - ``projects/{project_id}/locations/{location_id}`` + * `projects/{project_id}/locations/{location_id}` - If ``location_id`` is specified as ``-`` (wildcard), then all - regions available to the project are queried, and the results - are aggregated. + If `location_id` is specified as `-` (wildcard), then + all regions available to the project are queried, and + the results are aggregated. .. code-block:: python @@ -710,10 +710,11 @@ def sample_list_instances(): The request object. Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. parent (str): - Required. The resource name of the instance location - using the form: - ``projects/{project_id}/locations/{location_id}`` where - ``location_id`` refers to a GCP region. + Required. The resource name of the + instance location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -730,9 +731,9 @@ def sample_list_instances(): google.cloud.redis_v1.services.cloud_redis.pagers.ListInstancesPager: Response for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. - - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -831,9 +832,11 @@ def sample_get_instance(): The request object. Request for [GetInstance][google.cloud.redis.v1.CloudRedis.GetInstance]. name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -938,9 +941,11 @@ def sample_get_instance_auth_string(): The request object. Request for [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString]. name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1011,20 +1016,20 @@ def create_instance(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a Redis instance based on the specified tier and memory - size. + r"""Creates a Redis instance based on the specified tier + and memory size. + By default, the instance is accessible from the + project's [default + network](https://cloud.google.com/vpc/docs/vpc). + + The creation is executed asynchronously and callers may + check the returned operation to track its progress. Once + the operation is completed the Redis instance will be + fully functional. Completed longrunning.Operation will + contain the new instance object in the response field. - By default, the instance is accessible from the project's - `default network `__. - - The creation is executed asynchronously and callers may check - the returned operation to track its progress. Once the operation - is completed the Redis instance will be fully functional. - Completed longrunning.Operation will contain the new instance - object in the response field. - - The returned operation is automatically deleted after a few - hours, so there is no need to call DeleteOperation. + The returned operation is automatically deleted after a + few hours, so there is no need to call DeleteOperation. .. code-block:: python @@ -1068,24 +1073,27 @@ def sample_create_instance(): The request object. Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. parent (str): - Required. The resource name of the instance location - using the form: - ``projects/{project_id}/locations/{location_id}`` where - ``location_id`` refers to a GCP region. + Required. The resource name of the + instance location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. instance_id (str): - Required. The logical name of the Redis instance in the - customer project with the following restrictions: - - - Must contain only lowercase letters, numbers, and - hyphens. - - Must start with a letter. - - Must be between 1-40 characters. - - Must end with a number or a letter. - - Must be unique within the customer project / location + Required. The logical name of the + Redis instance in the customer project + with the following restrictions: + + * Must contain only lowercase letters, + numbers, and hyphens. * Must start with + a letter. + * Must be between 1-40 characters. + * Must end with a number or a letter. + * Must be unique within the customer + project / location This corresponds to the ``instance_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -1105,11 +1113,12 @@ def sample_create_instance(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1224,23 +1233,26 @@ def sample_update_instance(): The request object. Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Required. Mask of fields to update. At least one path - must be supplied in this field. The elements of the - repeated paths field may only include these fields from + Required. Mask of fields to update. + At least one path must be supplied in + this field. The elements of the repeated + paths field may only include these + fields from [Instance][google.cloud.redis.v1.Instance]: - - ``displayName`` - - ``labels`` - - ``memorySizeGb`` - - ``redisConfig`` - - ``replica_count`` + * `displayName` + * `labels` + * `memorySizeGb` + * `redisConfig` + * `replica_count` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. instance (google.cloud.redis_v1.types.Instance): - Required. Update description. Only fields specified in - update_mask are updated. + Required. Update description. + Only fields specified in update_mask are + updated. This corresponds to the ``instance`` field on the ``request`` instance; if ``request`` is provided, this @@ -1255,11 +1267,12 @@ def sample_update_instance(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1364,9 +1377,11 @@ def sample_upgrade_instance(): The request object. Request for [UpgradeInstance][google.cloud.redis.v1.CloudRedis.UpgradeInstance]. name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1388,11 +1403,12 @@ def sample_upgrade_instance(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1507,9 +1523,11 @@ def sample_import_instance(): The request object. Request for [Import][google.cloud.redis.v1.CloudRedis.ImportInstance]. name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1531,11 +1549,12 @@ def sample_import_instance(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1647,9 +1666,11 @@ def sample_export_instance(): The request object. Request for [Export][google.cloud.redis.v1.CloudRedis.ExportInstance]. name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1671,11 +1692,12 @@ def sample_export_instance(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1780,17 +1802,20 @@ def sample_failover_instance(): The request object. Request for [Failover][google.cloud.redis.v1.CloudRedis.FailoverInstance]. name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. data_protection_mode (google.cloud.redis_v1.types.FailoverInstanceRequest.DataProtectionMode): - Optional. Available data protection modes that the user - can choose. If it's unspecified, data protection mode - will be LIMITED_DATA_LOSS by default. + Optional. Available data protection + modes that the user can choose. If it's + unspecified, data protection mode will + be LIMITED_DATA_LOSS by default. This corresponds to the ``data_protection_mode`` field on the ``request`` instance; if ``request`` is provided, this @@ -1805,11 +1830,12 @@ def sample_failover_instance(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1912,9 +1938,11 @@ def sample_delete_instance(): The request object. Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1929,18 +1957,21 @@ def sample_delete_instance(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. @@ -2044,24 +2075,29 @@ def sample_reschedule_maintenance(): The request object. Request for [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance]. name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set. reschedule_type (google.cloud.redis_v1.types.RescheduleMaintenanceRequest.RescheduleType): - Required. If reschedule type is SPECIFIC_TIME, must set - up schedule_time as well. + Required. If reschedule type is + SPECIFIC_TIME, must set up schedule_time + as well. This corresponds to the ``reschedule_type`` field on the ``request`` instance; if ``request`` is provided, this should not be set. schedule_time (google.protobuf.timestamp_pb2.Timestamp): - Optional. Timestamp when the maintenance shall be - rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC - 3339 format, for example ``2012-11-15T16:19:00.094Z``. + Optional. Timestamp when the + maintenance shall be rescheduled to if + reschedule_type=SPECIFIC_TIME, in RFC + 3339 format, for example + `2012-11-15T16:19:00.094Z`. This corresponds to the ``schedule_time`` field on the ``request`` instance; if ``request`` is provided, this @@ -2076,11 +2112,12 @@ def sample_reschedule_maintenance(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc.py index ac164835f5..c5b479d65c 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc.py @@ -111,23 +111,23 @@ class CloudRedisGrpcTransport(CloudRedisTransport): Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -355,16 +355,16 @@ def list_instances(self) -> Callable[ cloud_redis.ListInstancesResponse]: r"""Return a callable for the list instances method over gRPC. - Lists all Redis instances owned by a project in either the - specified location (region) or all locations. + Lists all Redis instances owned by a project in + either the specified location (region) or all locations. The location should have the following format: - - ``projects/{project_id}/locations/{location_id}`` + * `projects/{project_id}/locations/{location_id}` - If ``location_id`` is specified as ``-`` (wildcard), then all - regions available to the project are queried, and the results - are aggregated. + If `location_id` is specified as `-` (wildcard), then + all regions available to the project are queried, and + the results are aggregated. Returns: Callable[[~.ListInstancesRequest], @@ -445,20 +445,20 @@ def create_instance(self) -> Callable[ operations_pb2.Operation]: r"""Return a callable for the create instance method over gRPC. - Creates a Redis instance based on the specified tier and memory - size. + Creates a Redis instance based on the specified tier + and memory size. + By default, the instance is accessible from the + project's [default + network](https://cloud.google.com/vpc/docs/vpc). - By default, the instance is accessible from the project's - `default network `__. + The creation is executed asynchronously and callers may + check the returned operation to track its progress. Once + the operation is completed the Redis instance will be + fully functional. Completed longrunning.Operation will + contain the new instance object in the response field. - The creation is executed asynchronously and callers may check - the returned operation to track its progress. Once the operation - is completed the Redis instance will be fully functional. - Completed longrunning.Operation will contain the new instance - object in the response field. - - The returned operation is automatically deleted after a few - hours, so there is no need to call DeleteOperation. + The returned operation is automatically deleted after a + few hours, so there is no need to call DeleteOperation. Returns: Callable[[~.CreateInstanceRequest], diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc_asyncio.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc_asyncio.py index 46f96b5c5c..83feaea5f5 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc_asyncio.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc_asyncio.py @@ -115,23 +115,23 @@ class CloudRedisGrpcAsyncIOTransport(CloudRedisTransport): Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -361,16 +361,16 @@ def list_instances(self) -> Callable[ Awaitable[cloud_redis.ListInstancesResponse]]: r"""Return a callable for the list instances method over gRPC. - Lists all Redis instances owned by a project in either the - specified location (region) or all locations. + Lists all Redis instances owned by a project in + either the specified location (region) or all locations. The location should have the following format: - - ``projects/{project_id}/locations/{location_id}`` + * `projects/{project_id}/locations/{location_id}` - If ``location_id`` is specified as ``-`` (wildcard), then all - regions available to the project are queried, and the results - are aggregated. + If `location_id` is specified as `-` (wildcard), then + all regions available to the project are queried, and + the results are aggregated. Returns: Callable[[~.ListInstancesRequest], @@ -451,20 +451,20 @@ def create_instance(self) -> Callable[ Awaitable[operations_pb2.Operation]]: r"""Return a callable for the create instance method over gRPC. - Creates a Redis instance based on the specified tier and memory - size. + Creates a Redis instance based on the specified tier + and memory size. + By default, the instance is accessible from the + project's [default + network](https://cloud.google.com/vpc/docs/vpc). - By default, the instance is accessible from the project's - `default network `__. + The creation is executed asynchronously and callers may + check the returned operation to track its progress. Once + the operation is completed the Redis instance will be + fully functional. Completed longrunning.Operation will + contain the new instance object in the response field. - The creation is executed asynchronously and callers may check - the returned operation to track its progress. Once the operation - is completed the Redis instance will be fully functional. - Completed longrunning.Operation will contain the new instance - object in the response field. - - The returned operation is automatically deleted after a few - hours, so there is no need to call DeleteOperation. + The returned operation is automatically deleted after a + few hours, so there is no need to call DeleteOperation. Returns: Callable[[~.CreateInstanceRequest], diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py index e9a1c7a484..3fcd37d17e 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py @@ -731,23 +731,23 @@ class CloudRedisRestTransport(_BaseCloudRedisRestTransport): Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest_asyncio.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest_asyncio.py index 832be441c1..3489531ad4 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest_asyncio.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest_asyncio.py @@ -742,23 +742,23 @@ class AsyncCloudRedisRestTransport(_BaseCloudRedisRestTransport): Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/types/cloud_redis.py b/tests/integration/goldens/redis/google/cloud/redis_v1/types/cloud_redis.py index 8e6a18eba6..725bd13ac7 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/types/cloud_redis.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/types/cloud_redis.py @@ -86,15 +86,18 @@ class Instance(proto.Message): Attributes: name (str): - Required. Unique name of the resource in this scope - including project and location using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note: Redis instances are managed and addressed at regional - level so location_id here refers to a GCP region; however, - users may choose which specific zone (or collection of zones - for cross-zone instances) an instance should be provisioned - in. Refer to + Required. Unique name of the resource in this + scope including project and location using the + form: + + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note: Redis instances are managed and addressed + at regional level so location_id here refers to + a GCP region; however, users may choose which + specific zone (or collection of zones for + cross-zone instances) an instance should be + provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] @@ -115,38 +118,46 @@ class Instance(proto.Message): at least one node will be provisioned in this zone. alternative_location_id (str): - Optional. If specified, at least one node will be - provisioned in this zone in addition to the zone specified - in location_id. Only applicable to standard tier. If - provided, it must be a different zone from the one provided - in [location_id]. Additional nodes beyond the first 2 will - be placed in zones selected by the service. + Optional. If specified, at least one node + will be provisioned in this zone in addition to + the zone specified in location_id. Only + applicable to standard tier. If provided, it + must be a different zone from the one provided + in [location_id]. Additional nodes beyond the + first 2 will be placed in zones selected by the + service. redis_version (str): - Optional. The version of Redis software. If not provided, - latest supported version will be used. Currently, the - supported values are: - - - ``REDIS_3_2`` for Redis 3.2 compatibility - - ``REDIS_4_0`` for Redis 4.0 compatibility (default) - - ``REDIS_5_0`` for Redis 5.0 compatibility - - ``REDIS_6_X`` for Redis 6.x compatibility + Optional. The version of Redis software. + If not provided, latest supported version will + be used. Currently, the supported values are: + + * `REDIS_3_2` for Redis 3.2 compatibility + * `REDIS_4_0` for Redis 4.0 compatibility + (default) * `REDIS_5_0` for Redis 5.0 + compatibility + * `REDIS_6_X` for Redis 6.x compatibility reserved_ip_range (str): - Optional. For DIRECT_PEERING mode, the CIDR range of - internal addresses that are reserved for this instance. - Range must be unique and non-overlapping with existing - subnets in an authorized network. For PRIVATE_SERVICE_ACCESS - mode, the name of one allocated IP address ranges associated - with this private service access connection. If not - provided, the service will choose an unused /29 block, for - example, 10.0.0.0/29 or 192.168.0.0/29. For - READ_REPLICAS_ENABLED the default block size is /28. + Optional. For DIRECT_PEERING mode, the CIDR + range of internal addresses that are reserved + for this instance. Range must be unique and + non-overlapping with existing subnets in an + authorized network. For PRIVATE_SERVICE_ACCESS + mode, the name of one allocated IP address + ranges associated with this private service + access connection. If not provided, the service + will choose an unused /29 block, for example, + 10.0.0.0/29 or 192.168.0.0/29. For + READ_REPLICAS_ENABLED the default block size is + /28. secondary_ip_range (str): - Optional. Additional IP range for node placement. Required - when enabling read replicas on an existing instance. For - DIRECT_PEERING mode value must be a CIDR range of size /28, - or "auto". For PRIVATE_SERVICE_ACCESS mode value must be the - name of an allocated address range associated with the - private service access connection, or "auto". + Optional. Additional IP range for node + placement. Required when enabling read replicas + on an existing instance. For DIRECT_PEERING mode + value must be a CIDR range of size /28, or + "auto". For PRIVATE_SERVICE_ACCESS mode value + must be the name of an allocated address range + associated with the private service access + connection, or "auto". host (str): Output only. Hostname or IP address of the exposed Redis endpoint used by clients to @@ -155,10 +166,11 @@ class Instance(proto.Message): Output only. The port number of the exposed Redis endpoint. current_location_id (str): - Output only. The current zone where the Redis primary node - is located. In basic tier, this will always be the same as - [location_id]. In standard tier, this can be the zone of any - node in the instance. + Output only. The current zone where the Redis + primary node is located. In basic tier, this + will always be the same as [location_id]. In + standard tier, this can be the zone of any node + in the instance. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The time the instance was created. @@ -169,44 +181,48 @@ class Instance(proto.Message): Output only. Additional information about the current status of this instance, if available. redis_configs (MutableMapping[str, str]): - Optional. Redis configuration parameters, according to - http://redis.io/topics/config. Currently, the only supported - parameters are: + Optional. Redis configuration parameters, + according to http://redis.io/topics/config. + Currently, the only supported parameters are: - Redis version 3.2 and newer: + Redis version 3.2 and newer: - - maxmemory-policy - - notify-keyspace-events + * maxmemory-policy + * notify-keyspace-events - Redis version 4.0 and newer: + Redis version 4.0 and newer: - - activedefrag - - lfu-decay-time - - lfu-log-factor - - maxmemory-gb + * activedefrag + * lfu-decay-time + * lfu-log-factor + * maxmemory-gb - Redis version 5.0 and newer: + Redis version 5.0 and newer: - - stream-node-max-bytes - - stream-node-max-entries + * stream-node-max-bytes + * stream-node-max-entries tier (google.cloud.redis_v1.types.Instance.Tier): Required. The service tier of the instance. memory_size_gb (int): Required. Redis memory size in GiB. authorized_network (str): - Optional. The full name of the Google Compute Engine - `network `__ to which - the instance is connected. If left unspecified, the - ``default`` network will be used. + Optional. The full name of the Google Compute + Engine + [network](https://cloud.google.com/vpc/docs/vpc) + to which the instance is connected. If left + unspecified, the `default` network will be used. persistence_iam_identity (str): - Output only. Cloud IAM identity used by import / export - operations to transfer data to/from Cloud Storage. Format is - "serviceAccount:". The value may - change over time for a given instance so should be checked - before each import/export operation. + Output only. Cloud IAM identity used by + import / export operations to transfer data + to/from Cloud Storage. Format is + "serviceAccount:". The + value may change over time for a given instance + so should be checked before each import/export + operation. connect_mode (google.cloud.redis_v1.types.Instance.ConnectMode): - Optional. The network connect mode of the Redis instance. If - not provided, the connect mode defaults to DIRECT_PEERING. + Optional. The network connect mode of the + Redis instance. If not provided, the connect + mode defaults to DIRECT_PEERING. auth_enabled (bool): Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH @@ -227,12 +243,13 @@ class Instance(proto.Message): Output only. Date and time of upcoming maintenance events which have been scheduled. replica_count (int): - Optional. The number of replica nodes. The valid range for - the Standard Tier with read replicas enabled is [1-5] and - defaults to 2. If read replicas are not enabled for a - Standard Tier instance, the only valid value is 1 and the - default is 1. The valid value for basic tier is 0 and the - default is also 0. + Optional. The number of replica nodes. The + valid range for the Standard Tier with read + replicas enabled is [1-5] and defaults to 2. If + read replicas are not enabled for a Standard + Tier instance, the only valid value is 1 and the + default is 1. The valid value for basic tier is + 0 and the default is also 0. nodes (MutableSequence[google.cloud.redis_v1.types.NodeInfo]): Output only. Info per node. read_endpoint (str): @@ -247,8 +264,8 @@ class Instance(proto.Message): readonly redis endpoint. Standard tier only. Write requests should target 'port'. read_replicas_mode (google.cloud.redis_v1.types.Instance.ReadReplicasMode): - Optional. Read replicas mode for the instance. Defaults to - READ_REPLICAS_DISABLED. + Optional. Read replicas mode for the + instance. Defaults to READ_REPLICAS_DISABLED. customer_managed_key (str): Optional. The KMS key reference that the customer provides when trying to create the @@ -260,8 +277,9 @@ class Instance(proto.Message): Optional. reasons that causes instance in "SUSPENDED" state. maintenance_version (str): - Optional. The self service update maintenance version. The - version is date based such as "20210712_00_00". + Optional. The self service update maintenance + version. The version is date based such as + "20210712_00_00". available_maintenance_versions (MutableSequence[str]): Optional. The available maintenance versions that an instance could update to. @@ -316,7 +334,8 @@ class Tier(proto.Enum): BASIC (1): BASIC tier: standalone instance STANDARD_HA (3): - STANDARD_HA tier: highly available primary/replica instances + STANDARD_HA tier: highly available + primary/replica instances """ TIER_UNSPECIFIED = 0 BASIC = 1 @@ -362,8 +381,8 @@ class ReadReplicasMode(proto.Enum): Values: READ_REPLICAS_MODE_UNSPECIFIED (0): - If not set, Memorystore Redis backend will default to - READ_REPLICAS_DISABLED. + If not set, Memorystore Redis backend will + default to READ_REPLICAS_DISABLED. READ_REPLICAS_DISABLED (1): If disabled, read endpoint will not be provided and the instance cannot scale up or @@ -556,13 +575,15 @@ class PersistenceConfig(proto.Message): features are enabled. If not provided, the existing value will be used. rdb_snapshot_period (google.cloud.redis_v1.types.PersistenceConfig.SnapshotPeriod): - Optional. Period between RDB snapshots. Snapshots will be - attempted every period starting from the provided snapshot - start time. For example, a start time of 01/01/2033 06:45 - and SIX_HOURS snapshot period will do nothing until - 01/01/2033, and then trigger snapshots every day at 06:45, - 12:45, 18:45, and 00:45 the next day, and so on. If not - provided, TWENTY_FOUR_HOURS will be used as default. + Optional. Period between RDB snapshots. + Snapshots will be attempted every period + starting from the provided snapshot start time. + For example, a start time of 01/01/2033 06:45 + and SIX_HOURS snapshot period will do nothing + until 01/01/2033, and then trigger snapshots + every day at 06:45, 12:45, 18:45, and 00:45 the + next day, and so on. If not provided, + TWENTY_FOUR_HOURS will be used as default. rdb_next_snapshot_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The next time that a snapshot attempt is scheduled to occur. @@ -637,16 +658,19 @@ class RescheduleMaintenanceRequest(proto.Message): Attributes: name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource name using + the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP region. reschedule_type (google.cloud.redis_v1.types.RescheduleMaintenanceRequest.RescheduleType): - Required. If reschedule type is SPECIFIC_TIME, must set up - schedule_time as well. + Required. If reschedule type is + SPECIFIC_TIME, must set up schedule_time as + well. schedule_time (google.protobuf.timestamp_pb2.Timestamp): - Optional. Timestamp when the maintenance shall be - rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 - format, for example ``2012-11-15T16:19:00.094Z``. + Optional. Timestamp when the maintenance + shall be rescheduled to if + reschedule_type=SPECIFIC_TIME, in RFC 3339 + format, for example `2012-11-15T16:19:00.094Z`. """ class RescheduleType(proto.Enum): r"""Reschedule options. @@ -697,13 +721,15 @@ class MaintenancePolicy(proto.Message): Output only. The time when the policy was last updated. description (str): - Optional. Description of what this policy is for. - Create/Update methods return INVALID_ARGUMENT if the length - is greater than 512. + Optional. Description of what this policy is + for. Create/Update methods return + INVALID_ARGUMENT if the length is greater than + 512. weekly_maintenance_window (MutableSequence[google.cloud.redis_v1.types.WeeklyMaintenanceWindow]): - Optional. Maintenance window that is applied to resources - covered by this policy. Minimum 1. For the current version, - the maximum number of weekly_window is expected to be one. + Optional. Maintenance window that is applied + to resources covered by this policy. Minimum 1. + For the current version, the maximum number of + weekly_window is expected to be one. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -807,20 +833,24 @@ class ListInstancesRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the instance location using - the form: ``projects/{project_id}/locations/{location_id}`` - where ``location_id`` refers to a GCP region. + Required. The resource name of the instance + location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP region. page_size (int): The maximum number of items to return. - If not specified, a default value of 1000 will be used by - the service. Regardless of the page_size value, the response - may include a partial list and a caller should only rely on + If not specified, a default value of 1000 will + be used by the service. Regardless of the + page_size value, the response may include a + partial list and a caller should only rely on response's - [``next_page_token``][google.cloud.redis.v1.ListInstancesResponse.next_page_token] - to determine if there are more instances left to be queried. + [`next_page_token`][google.cloud.redis.v1.ListInstancesResponse.next_page_token] + to determine if there are more instances left to + be queried. page_token (str): - The ``next_page_token`` value returned from a previous + The `next_page_token` value returned from a + previous [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any. """ @@ -845,18 +875,20 @@ class ListInstancesResponse(proto.Message): Attributes: instances (MutableSequence[google.cloud.redis_v1.types.Instance]): - A list of Redis instances in the project in the specified - location, or across all locations. - - If the ``location_id`` in the parent field of the request is - "-", all regions available to the project are queried, and - the results aggregated. If in such an aggregated query a - location is unavailable, a placeholder Redis entry is - included in the response with the ``name`` field set to a - value of the form - ``projects/{project_id}/locations/{location_id}/instances/``- - and the ``status`` field set to ERROR and ``status_message`` - field set to "location not available for ListInstances". + A list of Redis instances in the project in + the specified location, or across all locations. + + If the `location_id` in the parent field of the + request is "-", all regions available to the + project are queried, and the results aggregated. + If in such an aggregated query a location is + unavailable, a placeholder Redis entry is + included in the response with the `name` field + set to a value of the form + `projects/{project_id}/locations/{location_id}/instances/`- + and the `status` field set to ERROR and + `status_message` field set to "location not + available for ListInstances". next_page_token (str): Token to retrieve the next page of results, or empty if there are no more results in the @@ -890,9 +922,10 @@ class GetInstanceRequest(proto.Message): Attributes: name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource name using + the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP region. """ name: str = proto.Field( @@ -907,9 +940,10 @@ class GetInstanceAuthStringRequest(proto.Message): Attributes: name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource name using + the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP region. """ name: str = proto.Field( @@ -938,18 +972,21 @@ class CreateInstanceRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the instance location using - the form: ``projects/{project_id}/locations/{location_id}`` - where ``location_id`` refers to a GCP region. + Required. The resource name of the instance + location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP region. instance_id (str): - Required. The logical name of the Redis instance in the - customer project with the following restrictions: - - - Must contain only lowercase letters, numbers, and hyphens. - - Must start with a letter. - - Must be between 1-40 characters. - - Must end with a number or a letter. - - Must be unique within the customer project / location + Required. The logical name of the Redis + instance in the customer project with the + following restrictions: + + * Must contain only lowercase letters, numbers, + and hyphens. * Must start with a letter. + * Must be between 1-40 characters. + * Must end with a number or a letter. + * Must be unique within the customer project / + location instance (google.cloud.redis_v1.types.Instance): Required. A Redis [Instance] resource """ @@ -975,19 +1012,21 @@ class UpdateInstanceRequest(proto.Message): Attributes: update_mask (google.protobuf.field_mask_pb2.FieldMask): - Required. Mask of fields to update. At least one path must - be supplied in this field. The elements of the repeated - paths field may only include these fields from + Required. Mask of fields to update. At least + one path must be supplied in this field. The + elements of the repeated paths field may only + include these fields from [Instance][google.cloud.redis.v1.Instance]: - - ``displayName`` - - ``labels`` - - ``memorySizeGb`` - - ``redisConfig`` - - ``replica_count`` + * `displayName` + * `labels` + * `memorySizeGb` + * `redisConfig` + * `replica_count` instance (google.cloud.redis_v1.types.Instance): - Required. Update description. Only fields specified in - update_mask are updated. + Required. Update description. + Only fields specified in update_mask are + updated. """ update_mask: field_mask_pb2.FieldMask = proto.Field( @@ -1008,9 +1047,10 @@ class UpgradeInstanceRequest(proto.Message): Attributes: name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource name using + the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP region. redis_version (str): Required. Specifies the target version of Redis software to upgrade to. @@ -1032,9 +1072,10 @@ class DeleteInstanceRequest(proto.Message): Attributes: name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource name using + the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP region. """ name: str = proto.Field( @@ -1085,9 +1126,10 @@ class ImportInstanceRequest(proto.Message): Attributes: name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource name using + the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP region. input_config (google.cloud.redis_v1.types.InputConfig): Required. Specify data to be imported. """ @@ -1109,8 +1151,8 @@ class GcsDestination(proto.Message): Attributes: uri (str): Required. Data destination URI (e.g. - 'gs://my_bucket/my_object'). Existing files will be - overwritten. + 'gs://my_bucket/my_object'). Existing files will + be overwritten. """ uri: str = proto.Field( @@ -1146,9 +1188,10 @@ class ExportInstanceRequest(proto.Message): Attributes: name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource name using + the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP region. output_config (google.cloud.redis_v1.types.OutputConfig): Required. Specify data to be exported. """ @@ -1170,13 +1213,15 @@ class FailoverInstanceRequest(proto.Message): Attributes: name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource name using + the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP region. data_protection_mode (google.cloud.redis_v1.types.FailoverInstanceRequest.DataProtectionMode): - Optional. Available data protection modes that the user can - choose. If it's unspecified, data protection mode will be - LIMITED_DATA_LOSS by default. + Optional. Available data protection modes + that the user can choose. If it's unspecified, + data protection mode will be LIMITED_DATA_LOSS + by default. """ class DataProtectionMode(proto.Enum): r"""Specifies different modes of operation in relation to the @@ -1184,8 +1229,8 @@ class DataProtectionMode(proto.Enum): Values: DATA_PROTECTION_MODE_UNSPECIFIED (0): - Defaults to LIMITED_DATA_LOSS if a data protection mode is - not specified. + Defaults to LIMITED_DATA_LOSS if a data + protection mode is not specified. LIMITED_DATA_LOSS (1): Instance failover will be protected with data loss control. More specifically, the failover @@ -1265,18 +1310,20 @@ class OperationMetadata(proto.Message): class LocationMetadata(proto.Message): - r"""This location metadata represents additional configuration options - for a given location where a Redis instance may be created. All - fields are output only. It is returned as content of the - ``google.cloud.location.Location.metadata`` field. + r"""This location metadata represents additional configuration + options for a given location where a Redis instance may be + created. All fields are output only. It is returned as content + of the + `google.cloud.location.Location.metadata` field. Attributes: available_zones (MutableMapping[str, google.cloud.redis_v1.types.ZoneMetadata]): - Output only. The set of available zones in the location. The - map is keyed by the lowercase ID of each zone, as defined by - GCE. These keys can be specified in ``location_id`` or - ``alternative_location_id`` fields when creating a Redis - instance. + Output only. The set of available zones in + the location. The map is keyed by the lowercase + ID of each zone, as defined by GCE. These keys + can be specified in `location_id` or + `alternative_location_id` fields when creating a + Redis instance. """ available_zones: MutableMapping[str, 'ZoneMetadata'] = proto.MapField( @@ -1304,13 +1351,15 @@ class TlsCertificate(proto.Message): cert (str): PEM representation. create_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time when the certificate was created in - `RFC 3339 `__ format, - for example ``2020-05-18T00:00:00.094Z``. + Output only. The time when the certificate + was created in [RFC + 3339](https://tools.ietf.org/html/rfc3339) + format, for example `2020-05-18T00:00:00.094Z`. expire_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time when the certificate expires in `RFC - 3339 `__ format, for - example ``2020-05-18T00:00:00.094Z``. + Output only. The time when the certificate + expires in [RFC + 3339](https://tools.ietf.org/html/rfc3339) + format, for example `2020-05-18T00:00:00.094Z`. sha1_fingerprint (str): Sha1 Fingerprint of the certificate. """ diff --git a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/async_client.py b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/async_client.py index 6e826449ce..c5787c70bd 100755 --- a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/async_client.py +++ b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/async_client.py @@ -60,23 +60,23 @@ class CloudRedisAsyncClient: Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` """ _client: CloudRedisClient @@ -286,16 +286,16 @@ async def list_instances(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListInstancesAsyncPager: - r"""Lists all Redis instances owned by a project in either the - specified location (region) or all locations. + r"""Lists all Redis instances owned by a project in + either the specified location (region) or all locations. The location should have the following format: - - ``projects/{project_id}/locations/{location_id}`` + * `projects/{project_id}/locations/{location_id}` - If ``location_id`` is specified as ``-`` (wildcard), then all - regions available to the project are queried, and the results - are aggregated. + If `location_id` is specified as `-` (wildcard), then + all regions available to the project are queried, and + the results are aggregated. .. code-block:: python @@ -329,10 +329,11 @@ async def sample_list_instances(): The request object. Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. parent (:class:`str`): - Required. The resource name of the instance location - using the form: - ``projects/{project_id}/locations/{location_id}`` where - ``location_id`` refers to a GCP region. + Required. The resource name of the + instance location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -349,9 +350,9 @@ async def sample_list_instances(): google.cloud.redis_v1.services.cloud_redis.pagers.ListInstancesAsyncPager: Response for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. - - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -451,9 +452,11 @@ async def sample_get_instance(): The request object. Request for [GetInstance][google.cloud.redis.v1.CloudRedis.GetInstance]. name (:class:`str`): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -525,20 +528,20 @@ async def create_instance(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation_async.AsyncOperation: - r"""Creates a Redis instance based on the specified tier and memory - size. + r"""Creates a Redis instance based on the specified tier + and memory size. + By default, the instance is accessible from the + project's [default + network](https://cloud.google.com/vpc/docs/vpc). - By default, the instance is accessible from the project's - `default network `__. + The creation is executed asynchronously and callers may + check the returned operation to track its progress. Once + the operation is completed the Redis instance will be + fully functional. Completed longrunning.Operation will + contain the new instance object in the response field. - The creation is executed asynchronously and callers may check - the returned operation to track its progress. Once the operation - is completed the Redis instance will be fully functional. - Completed longrunning.Operation will contain the new instance - object in the response field. - - The returned operation is automatically deleted after a few - hours, so there is no need to call DeleteOperation. + The returned operation is automatically deleted after a + few hours, so there is no need to call DeleteOperation. .. code-block:: python @@ -582,24 +585,27 @@ async def sample_create_instance(): The request object. Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. parent (:class:`str`): - Required. The resource name of the instance location - using the form: - ``projects/{project_id}/locations/{location_id}`` where - ``location_id`` refers to a GCP region. + Required. The resource name of the + instance location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. instance_id (:class:`str`): - Required. The logical name of the Redis instance in the - customer project with the following restrictions: - - - Must contain only lowercase letters, numbers, and - hyphens. - - Must start with a letter. - - Must be between 1-40 characters. - - Must end with a number or a letter. - - Must be unique within the customer project / location + Required. The logical name of the + Redis instance in the customer project + with the following restrictions: + + * Must contain only lowercase letters, + numbers, and hyphens. * Must start with + a letter. + * Must be between 1-40 characters. + * Must end with a number or a letter. + * Must be unique within the customer + project / location This corresponds to the ``instance_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -619,11 +625,12 @@ async def sample_create_instance(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -739,23 +746,26 @@ async def sample_update_instance(): The request object. Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`): - Required. Mask of fields to update. At least one path - must be supplied in this field. The elements of the - repeated paths field may only include these fields from + Required. Mask of fields to update. + At least one path must be supplied in + this field. The elements of the repeated + paths field may only include these + fields from [Instance][google.cloud.redis.v1.Instance]: - - ``displayName`` - - ``labels`` - - ``memorySizeGb`` - - ``redisConfig`` - - ``replica_count`` + * `displayName` + * `labels` + * `memorySizeGb` + * `redisConfig` + * `replica_count` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. instance (:class:`google.cloud.redis_v1.types.Instance`): - Required. Update description. Only fields specified in - update_mask are updated. + Required. Update description. + Only fields specified in update_mask are + updated. This corresponds to the ``instance`` field on the ``request`` instance; if ``request`` is provided, this @@ -770,11 +780,12 @@ async def sample_update_instance(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -878,9 +889,11 @@ async def sample_delete_instance(): The request object. Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. name (:class:`str`): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -895,18 +908,21 @@ async def sample_delete_instance(): Returns: google.api_core.operation_async.AsyncOperation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. diff --git a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/client.py b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/client.py index 4202730528..4bd8619126 100755 --- a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/client.py +++ b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/client.py @@ -111,23 +111,23 @@ class CloudRedisClient(metaclass=CloudRedisClientMeta): Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` """ @staticmethod @@ -667,16 +667,16 @@ def list_instances(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> pagers.ListInstancesPager: - r"""Lists all Redis instances owned by a project in either the - specified location (region) or all locations. + r"""Lists all Redis instances owned by a project in + either the specified location (region) or all locations. The location should have the following format: - - ``projects/{project_id}/locations/{location_id}`` + * `projects/{project_id}/locations/{location_id}` - If ``location_id`` is specified as ``-`` (wildcard), then all - regions available to the project are queried, and the results - are aggregated. + If `location_id` is specified as `-` (wildcard), then + all regions available to the project are queried, and + the results are aggregated. .. code-block:: python @@ -710,10 +710,11 @@ def sample_list_instances(): The request object. Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. parent (str): - Required. The resource name of the instance location - using the form: - ``projects/{project_id}/locations/{location_id}`` where - ``location_id`` refers to a GCP region. + Required. The resource name of the + instance location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -730,9 +731,9 @@ def sample_list_instances(): google.cloud.redis_v1.services.cloud_redis.pagers.ListInstancesPager: Response for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. - - Iterating over this object will yield results and - resolve additional pages automatically. + Iterating over this object will yield + results and resolve additional pages + automatically. """ # Create or coerce a protobuf request object. @@ -831,9 +832,11 @@ def sample_get_instance(): The request object. Request for [GetInstance][google.cloud.redis.v1.CloudRedis.GetInstance]. name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -904,20 +907,20 @@ def create_instance(self, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, Union[str, bytes]]] = (), ) -> operation.Operation: - r"""Creates a Redis instance based on the specified tier and memory - size. + r"""Creates a Redis instance based on the specified tier + and memory size. + By default, the instance is accessible from the + project's [default + network](https://cloud.google.com/vpc/docs/vpc). - By default, the instance is accessible from the project's - `default network `__. + The creation is executed asynchronously and callers may + check the returned operation to track its progress. Once + the operation is completed the Redis instance will be + fully functional. Completed longrunning.Operation will + contain the new instance object in the response field. - The creation is executed asynchronously and callers may check - the returned operation to track its progress. Once the operation - is completed the Redis instance will be fully functional. - Completed longrunning.Operation will contain the new instance - object in the response field. - - The returned operation is automatically deleted after a few - hours, so there is no need to call DeleteOperation. + The returned operation is automatically deleted after a + few hours, so there is no need to call DeleteOperation. .. code-block:: python @@ -961,24 +964,27 @@ def sample_create_instance(): The request object. Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. parent (str): - Required. The resource name of the instance location - using the form: - ``projects/{project_id}/locations/{location_id}`` where - ``location_id`` refers to a GCP region. + Required. The resource name of the + instance location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. instance_id (str): - Required. The logical name of the Redis instance in the - customer project with the following restrictions: - - - Must contain only lowercase letters, numbers, and - hyphens. - - Must start with a letter. - - Must be between 1-40 characters. - - Must end with a number or a letter. - - Must be unique within the customer project / location + Required. The logical name of the + Redis instance in the customer project + with the following restrictions: + + * Must contain only lowercase letters, + numbers, and hyphens. * Must start with + a letter. + * Must be between 1-40 characters. + * Must end with a number or a letter. + * Must be unique within the customer + project / location This corresponds to the ``instance_id`` field on the ``request`` instance; if ``request`` is provided, this @@ -998,11 +1004,12 @@ def sample_create_instance(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1117,23 +1124,26 @@ def sample_update_instance(): The request object. Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. update_mask (google.protobuf.field_mask_pb2.FieldMask): - Required. Mask of fields to update. At least one path - must be supplied in this field. The elements of the - repeated paths field may only include these fields from + Required. Mask of fields to update. + At least one path must be supplied in + this field. The elements of the repeated + paths field may only include these + fields from [Instance][google.cloud.redis.v1.Instance]: - - ``displayName`` - - ``labels`` - - ``memorySizeGb`` - - ``redisConfig`` - - ``replica_count`` + * `displayName` + * `labels` + * `memorySizeGb` + * `redisConfig` + * `replica_count` This corresponds to the ``update_mask`` field on the ``request`` instance; if ``request`` is provided, this should not be set. instance (google.cloud.redis_v1.types.Instance): - Required. Update description. Only fields specified in - update_mask are updated. + Required. Update description. + Only fields specified in update_mask are + updated. This corresponds to the ``instance`` field on the ``request`` instance; if ``request`` is provided, this @@ -1148,11 +1158,12 @@ def sample_update_instance(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be - :class:`google.cloud.redis_v1.types.Instance` A - Memorystore for Redis instance. + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.cloud.redis_v1.types.Instance` + A Memorystore for Redis instance. """ # Create or coerce a protobuf request object. @@ -1255,9 +1266,11 @@ def sample_delete_instance(): The request object. Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource + name using the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP + region. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -1272,18 +1285,21 @@ def sample_delete_instance(): Returns: google.api_core.operation.Operation: - An object representing a long-running operation. - - The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated - empty messages in your APIs. A typical example is to - use it as the request or the response type of an API - method. For instance: - - service Foo { - rpc Bar(google.protobuf.Empty) returns - (google.protobuf.Empty); - - } + An object representing a long-running + operation. + The result type for the operation will + be + :class:`google.protobuf.empty_pb2.Empty` + A generic empty message that you can + re-use to avoid defining duplicated + empty messages in your APIs. A typical + example is to use it as the request or + the response type of an API method. For + instance: + + service Foo { + rpc Bar(google.protobuf.Empty) + returns (google.protobuf.Empty); } """ # Create or coerce a protobuf request object. diff --git a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/grpc.py b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/grpc.py index fe65a8baf8..1a1d90fbb5 100755 --- a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/grpc.py +++ b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/grpc.py @@ -111,23 +111,23 @@ class CloudRedisGrpcTransport(CloudRedisTransport): Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -355,16 +355,16 @@ def list_instances(self) -> Callable[ cloud_redis.ListInstancesResponse]: r"""Return a callable for the list instances method over gRPC. - Lists all Redis instances owned by a project in either the - specified location (region) or all locations. + Lists all Redis instances owned by a project in + either the specified location (region) or all locations. The location should have the following format: - - ``projects/{project_id}/locations/{location_id}`` + * `projects/{project_id}/locations/{location_id}` - If ``location_id`` is specified as ``-`` (wildcard), then all - regions available to the project are queried, and the results - are aggregated. + If `location_id` is specified as `-` (wildcard), then + all regions available to the project are queried, and + the results are aggregated. Returns: Callable[[~.ListInstancesRequest], @@ -416,20 +416,20 @@ def create_instance(self) -> Callable[ operations_pb2.Operation]: r"""Return a callable for the create instance method over gRPC. - Creates a Redis instance based on the specified tier and memory - size. - - By default, the instance is accessible from the project's - `default network `__. + Creates a Redis instance based on the specified tier + and memory size. + By default, the instance is accessible from the + project's [default + network](https://cloud.google.com/vpc/docs/vpc). - The creation is executed asynchronously and callers may check - the returned operation to track its progress. Once the operation - is completed the Redis instance will be fully functional. - Completed longrunning.Operation will contain the new instance - object in the response field. + The creation is executed asynchronously and callers may + check the returned operation to track its progress. Once + the operation is completed the Redis instance will be + fully functional. Completed longrunning.Operation will + contain the new instance object in the response field. - The returned operation is automatically deleted after a few - hours, so there is no need to call DeleteOperation. + The returned operation is automatically deleted after a + few hours, so there is no need to call DeleteOperation. Returns: Callable[[~.CreateInstanceRequest], diff --git a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/grpc_asyncio.py b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/grpc_asyncio.py index a3393990f2..358bfdae7e 100755 --- a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/grpc_asyncio.py +++ b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/grpc_asyncio.py @@ -115,23 +115,23 @@ class CloudRedisGrpcAsyncIOTransport(CloudRedisTransport): Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation @@ -361,16 +361,16 @@ def list_instances(self) -> Callable[ Awaitable[cloud_redis.ListInstancesResponse]]: r"""Return a callable for the list instances method over gRPC. - Lists all Redis instances owned by a project in either the - specified location (region) or all locations. + Lists all Redis instances owned by a project in + either the specified location (region) or all locations. The location should have the following format: - - ``projects/{project_id}/locations/{location_id}`` + * `projects/{project_id}/locations/{location_id}` - If ``location_id`` is specified as ``-`` (wildcard), then all - regions available to the project are queried, and the results - are aggregated. + If `location_id` is specified as `-` (wildcard), then + all regions available to the project are queried, and + the results are aggregated. Returns: Callable[[~.ListInstancesRequest], @@ -422,20 +422,20 @@ def create_instance(self) -> Callable[ Awaitable[operations_pb2.Operation]]: r"""Return a callable for the create instance method over gRPC. - Creates a Redis instance based on the specified tier and memory - size. - - By default, the instance is accessible from the project's - `default network `__. + Creates a Redis instance based on the specified tier + and memory size. + By default, the instance is accessible from the + project's [default + network](https://cloud.google.com/vpc/docs/vpc). - The creation is executed asynchronously and callers may check - the returned operation to track its progress. Once the operation - is completed the Redis instance will be fully functional. - Completed longrunning.Operation will contain the new instance - object in the response field. + The creation is executed asynchronously and callers may + check the returned operation to track its progress. Once + the operation is completed the Redis instance will be + fully functional. Completed longrunning.Operation will + contain the new instance object in the response field. - The returned operation is automatically deleted after a few - hours, so there is no need to call DeleteOperation. + The returned operation is automatically deleted after a + few hours, so there is no need to call DeleteOperation. Returns: Callable[[~.CreateInstanceRequest], diff --git a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/rest.py b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/rest.py index 7e43d25df4..5de34ea5ab 100755 --- a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/rest.py +++ b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/rest.py @@ -467,23 +467,23 @@ class CloudRedisRestTransport(_BaseCloudRedisRestTransport): Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation diff --git a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/rest_asyncio.py b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/rest_asyncio.py index fdb993eada..5b208997bf 100755 --- a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/rest_asyncio.py +++ b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/rest_asyncio.py @@ -478,23 +478,23 @@ class AsyncCloudRedisRestTransport(_BaseCloudRedisRestTransport): Google Cloud Memorystore for Redis v1 - The ``redis.googleapis.com`` service implements the Google Cloud - Memorystore for Redis API and defines the following resource model - for managing Redis instances: - - - The service works with a collection of cloud projects, named: - ``/projects/*`` - - Each project has a collection of available locations, named: - ``/locations/*`` - - Each location has a collection of Redis instances, named: - ``/instances/*`` - - As such, Redis instances are resources of the form: - ``/projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note that location_id must be referring to a GCP ``region``; for + The `redis.googleapis.com` service implements the Google Cloud + Memorystore for Redis API and defines the following resource + model for managing Redis instances: + + * The service works with a collection of cloud projects, named: + `/projects/*` * Each project has a collection of available + locations, named: `/locations/*` * Each location has a + collection of Redis instances, named: `/instances/*` * As such, + Redis instances are resources of the form: + + `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note that location_id must be referring to a GCP `region`; for example: - - ``projects/redpepper-1290/locations/us-central1/instances/my-redis`` + * + `projects/redpepper-1290/locations/us-central1/instances/my-redis` This class defines the same methods as the primary client, so the primary client can load the underlying transport implementation diff --git a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/types/cloud_redis.py b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/types/cloud_redis.py index 016aa43a64..a84f259923 100755 --- a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/types/cloud_redis.py +++ b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/types/cloud_redis.py @@ -73,15 +73,18 @@ class Instance(proto.Message): Attributes: name (str): - Required. Unique name of the resource in this scope - including project and location using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - - Note: Redis instances are managed and addressed at regional - level so location_id here refers to a GCP region; however, - users may choose which specific zone (or collection of zones - for cross-zone instances) an instance should be provisioned - in. Refer to + Required. Unique name of the resource in this + scope including project and location using the + form: + + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + + Note: Redis instances are managed and addressed + at regional level so location_id here refers to + a GCP region; however, users may choose which + specific zone (or collection of zones for + cross-zone instances) an instance should be + provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] @@ -102,38 +105,46 @@ class Instance(proto.Message): at least one node will be provisioned in this zone. alternative_location_id (str): - Optional. If specified, at least one node will be - provisioned in this zone in addition to the zone specified - in location_id. Only applicable to standard tier. If - provided, it must be a different zone from the one provided - in [location_id]. Additional nodes beyond the first 2 will - be placed in zones selected by the service. + Optional. If specified, at least one node + will be provisioned in this zone in addition to + the zone specified in location_id. Only + applicable to standard tier. If provided, it + must be a different zone from the one provided + in [location_id]. Additional nodes beyond the + first 2 will be placed in zones selected by the + service. redis_version (str): - Optional. The version of Redis software. If not provided, - latest supported version will be used. Currently, the - supported values are: - - - ``REDIS_3_2`` for Redis 3.2 compatibility - - ``REDIS_4_0`` for Redis 4.0 compatibility (default) - - ``REDIS_5_0`` for Redis 5.0 compatibility - - ``REDIS_6_X`` for Redis 6.x compatibility + Optional. The version of Redis software. + If not provided, latest supported version will + be used. Currently, the supported values are: + + * `REDIS_3_2` for Redis 3.2 compatibility + * `REDIS_4_0` for Redis 4.0 compatibility + (default) * `REDIS_5_0` for Redis 5.0 + compatibility + * `REDIS_6_X` for Redis 6.x compatibility reserved_ip_range (str): - Optional. For DIRECT_PEERING mode, the CIDR range of - internal addresses that are reserved for this instance. - Range must be unique and non-overlapping with existing - subnets in an authorized network. For PRIVATE_SERVICE_ACCESS - mode, the name of one allocated IP address ranges associated - with this private service access connection. If not - provided, the service will choose an unused /29 block, for - example, 10.0.0.0/29 or 192.168.0.0/29. For - READ_REPLICAS_ENABLED the default block size is /28. + Optional. For DIRECT_PEERING mode, the CIDR + range of internal addresses that are reserved + for this instance. Range must be unique and + non-overlapping with existing subnets in an + authorized network. For PRIVATE_SERVICE_ACCESS + mode, the name of one allocated IP address + ranges associated with this private service + access connection. If not provided, the service + will choose an unused /29 block, for example, + 10.0.0.0/29 or 192.168.0.0/29. For + READ_REPLICAS_ENABLED the default block size is + /28. secondary_ip_range (str): - Optional. Additional IP range for node placement. Required - when enabling read replicas on an existing instance. For - DIRECT_PEERING mode value must be a CIDR range of size /28, - or "auto". For PRIVATE_SERVICE_ACCESS mode value must be the - name of an allocated address range associated with the - private service access connection, or "auto". + Optional. Additional IP range for node + placement. Required when enabling read replicas + on an existing instance. For DIRECT_PEERING mode + value must be a CIDR range of size /28, or + "auto". For PRIVATE_SERVICE_ACCESS mode value + must be the name of an allocated address range + associated with the private service access + connection, or "auto". host (str): Output only. Hostname or IP address of the exposed Redis endpoint used by clients to @@ -142,10 +153,11 @@ class Instance(proto.Message): Output only. The port number of the exposed Redis endpoint. current_location_id (str): - Output only. The current zone where the Redis primary node - is located. In basic tier, this will always be the same as - [location_id]. In standard tier, this can be the zone of any - node in the instance. + Output only. The current zone where the Redis + primary node is located. In basic tier, this + will always be the same as [location_id]. In + standard tier, this can be the zone of any node + in the instance. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The time the instance was created. @@ -156,44 +168,48 @@ class Instance(proto.Message): Output only. Additional information about the current status of this instance, if available. redis_configs (MutableMapping[str, str]): - Optional. Redis configuration parameters, according to - http://redis.io/topics/config. Currently, the only supported - parameters are: + Optional. Redis configuration parameters, + according to http://redis.io/topics/config. + Currently, the only supported parameters are: - Redis version 3.2 and newer: + Redis version 3.2 and newer: - - maxmemory-policy - - notify-keyspace-events + * maxmemory-policy + * notify-keyspace-events - Redis version 4.0 and newer: + Redis version 4.0 and newer: - - activedefrag - - lfu-decay-time - - lfu-log-factor - - maxmemory-gb + * activedefrag + * lfu-decay-time + * lfu-log-factor + * maxmemory-gb - Redis version 5.0 and newer: + Redis version 5.0 and newer: - - stream-node-max-bytes - - stream-node-max-entries + * stream-node-max-bytes + * stream-node-max-entries tier (google.cloud.redis_v1.types.Instance.Tier): Required. The service tier of the instance. memory_size_gb (int): Required. Redis memory size in GiB. authorized_network (str): - Optional. The full name of the Google Compute Engine - `network `__ to which - the instance is connected. If left unspecified, the - ``default`` network will be used. + Optional. The full name of the Google Compute + Engine + [network](https://cloud.google.com/vpc/docs/vpc) + to which the instance is connected. If left + unspecified, the `default` network will be used. persistence_iam_identity (str): - Output only. Cloud IAM identity used by import / export - operations to transfer data to/from Cloud Storage. Format is - "serviceAccount:". The value may - change over time for a given instance so should be checked - before each import/export operation. + Output only. Cloud IAM identity used by + import / export operations to transfer data + to/from Cloud Storage. Format is + "serviceAccount:". The + value may change over time for a given instance + so should be checked before each import/export + operation. connect_mode (google.cloud.redis_v1.types.Instance.ConnectMode): - Optional. The network connect mode of the Redis instance. If - not provided, the connect mode defaults to DIRECT_PEERING. + Optional. The network connect mode of the + Redis instance. If not provided, the connect + mode defaults to DIRECT_PEERING. auth_enabled (bool): Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH @@ -214,12 +230,13 @@ class Instance(proto.Message): Output only. Date and time of upcoming maintenance events which have been scheduled. replica_count (int): - Optional. The number of replica nodes. The valid range for - the Standard Tier with read replicas enabled is [1-5] and - defaults to 2. If read replicas are not enabled for a - Standard Tier instance, the only valid value is 1 and the - default is 1. The valid value for basic tier is 0 and the - default is also 0. + Optional. The number of replica nodes. The + valid range for the Standard Tier with read + replicas enabled is [1-5] and defaults to 2. If + read replicas are not enabled for a Standard + Tier instance, the only valid value is 1 and the + default is 1. The valid value for basic tier is + 0 and the default is also 0. nodes (MutableSequence[google.cloud.redis_v1.types.NodeInfo]): Output only. Info per node. read_endpoint (str): @@ -234,8 +251,8 @@ class Instance(proto.Message): readonly redis endpoint. Standard tier only. Write requests should target 'port'. read_replicas_mode (google.cloud.redis_v1.types.Instance.ReadReplicasMode): - Optional. Read replicas mode for the instance. Defaults to - READ_REPLICAS_DISABLED. + Optional. Read replicas mode for the + instance. Defaults to READ_REPLICAS_DISABLED. customer_managed_key (str): Optional. The KMS key reference that the customer provides when trying to create the @@ -247,8 +264,9 @@ class Instance(proto.Message): Optional. reasons that causes instance in "SUSPENDED" state. maintenance_version (str): - Optional. The self service update maintenance version. The - version is date based such as "20210712_00_00". + Optional. The self service update maintenance + version. The version is date based such as + "20210712_00_00". available_maintenance_versions (MutableSequence[str]): Optional. The available maintenance versions that an instance could update to. @@ -303,7 +321,8 @@ class Tier(proto.Enum): BASIC (1): BASIC tier: standalone instance STANDARD_HA (3): - STANDARD_HA tier: highly available primary/replica instances + STANDARD_HA tier: highly available + primary/replica instances """ TIER_UNSPECIFIED = 0 BASIC = 1 @@ -349,8 +368,8 @@ class ReadReplicasMode(proto.Enum): Values: READ_REPLICAS_MODE_UNSPECIFIED (0): - If not set, Memorystore Redis backend will default to - READ_REPLICAS_DISABLED. + If not set, Memorystore Redis backend will + default to READ_REPLICAS_DISABLED. READ_REPLICAS_DISABLED (1): If disabled, read endpoint will not be provided and the instance cannot scale up or @@ -543,13 +562,15 @@ class PersistenceConfig(proto.Message): features are enabled. If not provided, the existing value will be used. rdb_snapshot_period (google.cloud.redis_v1.types.PersistenceConfig.SnapshotPeriod): - Optional. Period between RDB snapshots. Snapshots will be - attempted every period starting from the provided snapshot - start time. For example, a start time of 01/01/2033 06:45 - and SIX_HOURS snapshot period will do nothing until - 01/01/2033, and then trigger snapshots every day at 06:45, - 12:45, 18:45, and 00:45 the next day, and so on. If not - provided, TWENTY_FOUR_HOURS will be used as default. + Optional. Period between RDB snapshots. + Snapshots will be attempted every period + starting from the provided snapshot start time. + For example, a start time of 01/01/2033 06:45 + and SIX_HOURS snapshot period will do nothing + until 01/01/2033, and then trigger snapshots + every day at 06:45, 12:45, 18:45, and 00:45 the + next day, and so on. If not provided, + TWENTY_FOUR_HOURS will be used as default. rdb_next_snapshot_time (google.protobuf.timestamp_pb2.Timestamp): Output only. The next time that a snapshot attempt is scheduled to occur. @@ -629,13 +650,15 @@ class MaintenancePolicy(proto.Message): Output only. The time when the policy was last updated. description (str): - Optional. Description of what this policy is for. - Create/Update methods return INVALID_ARGUMENT if the length - is greater than 512. + Optional. Description of what this policy is + for. Create/Update methods return + INVALID_ARGUMENT if the length is greater than + 512. weekly_maintenance_window (MutableSequence[google.cloud.redis_v1.types.WeeklyMaintenanceWindow]): - Optional. Maintenance window that is applied to resources - covered by this policy. Minimum 1. For the current version, - the maximum number of weekly_window is expected to be one. + Optional. Maintenance window that is applied + to resources covered by this policy. Minimum 1. + For the current version, the maximum number of + weekly_window is expected to be one. """ create_time: timestamp_pb2.Timestamp = proto.Field( @@ -739,20 +762,24 @@ class ListInstancesRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the instance location using - the form: ``projects/{project_id}/locations/{location_id}`` - where ``location_id`` refers to a GCP region. + Required. The resource name of the instance + location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP region. page_size (int): The maximum number of items to return. - If not specified, a default value of 1000 will be used by - the service. Regardless of the page_size value, the response - may include a partial list and a caller should only rely on + If not specified, a default value of 1000 will + be used by the service. Regardless of the + page_size value, the response may include a + partial list and a caller should only rely on response's - [``next_page_token``][google.cloud.redis.v1.ListInstancesResponse.next_page_token] - to determine if there are more instances left to be queried. + [`next_page_token`][google.cloud.redis.v1.ListInstancesResponse.next_page_token] + to determine if there are more instances left to + be queried. page_token (str): - The ``next_page_token`` value returned from a previous + The `next_page_token` value returned from a + previous [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any. """ @@ -777,18 +804,20 @@ class ListInstancesResponse(proto.Message): Attributes: instances (MutableSequence[google.cloud.redis_v1.types.Instance]): - A list of Redis instances in the project in the specified - location, or across all locations. - - If the ``location_id`` in the parent field of the request is - "-", all regions available to the project are queried, and - the results aggregated. If in such an aggregated query a - location is unavailable, a placeholder Redis entry is - included in the response with the ``name`` field set to a - value of the form - ``projects/{project_id}/locations/{location_id}/instances/``- - and the ``status`` field set to ERROR and ``status_message`` - field set to "location not available for ListInstances". + A list of Redis instances in the project in + the specified location, or across all locations. + + If the `location_id` in the parent field of the + request is "-", all regions available to the + project are queried, and the results aggregated. + If in such an aggregated query a location is + unavailable, a placeholder Redis entry is + included in the response with the `name` field + set to a value of the form + `projects/{project_id}/locations/{location_id}/instances/`- + and the `status` field set to ERROR and + `status_message` field set to "location not + available for ListInstances". next_page_token (str): Token to retrieve the next page of results, or empty if there are no more results in the @@ -822,9 +851,10 @@ class GetInstanceRequest(proto.Message): Attributes: name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource name using + the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP region. """ name: str = proto.Field( @@ -839,18 +869,21 @@ class CreateInstanceRequest(proto.Message): Attributes: parent (str): - Required. The resource name of the instance location using - the form: ``projects/{project_id}/locations/{location_id}`` - where ``location_id`` refers to a GCP region. + Required. The resource name of the instance + location using the form: + `projects/{project_id}/locations/{location_id}` + where `location_id` refers to a GCP region. instance_id (str): - Required. The logical name of the Redis instance in the - customer project with the following restrictions: - - - Must contain only lowercase letters, numbers, and hyphens. - - Must start with a letter. - - Must be between 1-40 characters. - - Must end with a number or a letter. - - Must be unique within the customer project / location + Required. The logical name of the Redis + instance in the customer project with the + following restrictions: + + * Must contain only lowercase letters, numbers, + and hyphens. * Must start with a letter. + * Must be between 1-40 characters. + * Must end with a number or a letter. + * Must be unique within the customer project / + location instance (google.cloud.redis_v1.types.Instance): Required. A Redis [Instance] resource """ @@ -876,19 +909,21 @@ class UpdateInstanceRequest(proto.Message): Attributes: update_mask (google.protobuf.field_mask_pb2.FieldMask): - Required. Mask of fields to update. At least one path must - be supplied in this field. The elements of the repeated - paths field may only include these fields from + Required. Mask of fields to update. At least + one path must be supplied in this field. The + elements of the repeated paths field may only + include these fields from [Instance][google.cloud.redis.v1.Instance]: - - ``displayName`` - - ``labels`` - - ``memorySizeGb`` - - ``redisConfig`` - - ``replica_count`` + * `displayName` + * `labels` + * `memorySizeGb` + * `redisConfig` + * `replica_count` instance (google.cloud.redis_v1.types.Instance): - Required. Update description. Only fields specified in - update_mask are updated. + Required. Update description. + Only fields specified in update_mask are + updated. """ update_mask: field_mask_pb2.FieldMask = proto.Field( @@ -909,9 +944,10 @@ class DeleteInstanceRequest(proto.Message): Attributes: name (str): - Required. Redis instance resource name using the form: - ``projects/{project_id}/locations/{location_id}/instances/{instance_id}`` - where ``location_id`` refers to a GCP region. + Required. Redis instance resource name using + the form: + `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + where `location_id` refers to a GCP region. """ name: str = proto.Field( @@ -983,13 +1019,15 @@ class TlsCertificate(proto.Message): cert (str): PEM representation. create_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time when the certificate was created in - `RFC 3339 `__ format, - for example ``2020-05-18T00:00:00.094Z``. + Output only. The time when the certificate + was created in [RFC + 3339](https://tools.ietf.org/html/rfc3339) + format, for example `2020-05-18T00:00:00.094Z`. expire_time (google.protobuf.timestamp_pb2.Timestamp): - Output only. The time when the certificate expires in `RFC - 3339 `__ format, for - example ``2020-05-18T00:00:00.094Z``. + Output only. The time when the certificate + expires in [RFC + 3339](https://tools.ietf.org/html/rfc3339) + format, for example `2020-05-18T00:00:00.094Z`. sha1_fingerprint (str): Sha1 Fingerprint of the certificate. """ diff --git a/tests/unit/utils/test_rst.py b/tests/unit/utils/test_rst.py index 08c42a35b9..a30626636a 100644 --- a/tests/unit/utils/test_rst.py +++ b/tests/unit/utils/test_rst.py @@ -14,49 +14,32 @@ from unittest import mock -import pypandoc - from gapic import utils def test_rst_unformatted(): - with mock.patch.object(pypandoc, "convert_text") as convert_text: - assert utils.rst("The hail in Wales") == "The hail in Wales" - assert convert_text.call_count == 0 + assert utils.rst("The hail in Wales") == "The hail in Wales" def test_rst_formatted(): - with mock.patch.object(pypandoc, "convert_text") as convert_text: - convert_text.side_effect = lambda *a, **kw: a[0].replace("`", "``") - assert utils.rst("The hail in `Wales`") == "The hail in ``Wales``" - assert convert_text.call_count == 1 - assert convert_text.mock_calls[0][1][1] == "rst" - assert convert_text.mock_calls[0][2]["format"] == "commonmark" + assert utils.rst("The hail in `Wales`") == "The hail in `Wales`" def test_rst_add_newline(): - with mock.patch.object(pypandoc, "convert_text") as convert_text: - s = "The hail in Wales\nfalls mainly on the snails." - assert utils.rst(s) == s + "\n" - assert convert_text.call_count == 0 + s = "The hail in Wales\nfalls mainly on the snails." + assert utils.rst(s) == s + "\n" def test_rst_force_add_newline(): - with mock.patch.object(pypandoc, "convert_text") as convert_text: - s = "The hail in Wales" - assert utils.rst(s, nl=True) == s + "\n" - assert convert_text.call_count == 0 + s = "The hail in Wales" + assert utils.rst(s, nl=True) == s + "\n" def test_rst_disable_add_newline(): - with mock.patch.object(pypandoc, "convert_text") as convert_text: - s = "The hail in Wales\nfalls mainly on the snails." - assert utils.rst(s, nl=False) == s - assert convert_text.call_count == 0 + s = "The hail in Wales\nfalls mainly on the snails." + assert utils.rst(s, nl=False) == s def test_rst_pad_close_quote(): - with mock.patch.object(pypandoc, "convert_text") as convert_text: - s = 'A value, as in "foo"' - assert utils.rst(s) == s + "." - assert convert_text.call_count == 0 + s = 'A value, as in "foo"' + assert utils.rst(s) == s + "." diff --git a/tests/unit/utils/test_uri_conv.py b/tests/unit/utils/test_uri_conv.py index eeb6d25348..f357bdc40a 100644 --- a/tests/unit/utils/test_uri_conv.py +++ b/tests/unit/utils/test_uri_conv.py @@ -13,8 +13,6 @@ # limitations under the License. -import pypandoc - from gapic import utils