Skip to content

Commit 7fcde4f

Browse files
feat: [google-cloud-monitoring] Add support to add links in AlertPolicy (#12810)
BEGIN_COMMIT_OVERRIDE feat: Add support to add links in AlertPolicy END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. PiperOrigin-RevId: 644006298 Source-Link: googleapis/googleapis@1e76b72 Source-Link: googleapis/googleapis-gen@20b1d51 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1vbml0b3JpbmcvLk93bEJvdC55YW1sIiwiaCI6IjIwYjFkNTEzOWU4NmVhOWQxZjhjYzRiYTcyZGJkZWU0NDExNmMyNmUifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: ohmayr <omairnaveed@ymail.com>
1 parent 6945437 commit 7fcde4f

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

  • packages/google-cloud-monitoring/google/cloud/monitoring_v3/types

packages/google-cloud-monitoring/google/cloud/monitoring_v3/types/alert.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,38 @@ class Documentation(proto.Message):
243243
variables <https://cloud.google.com/monitoring/alerts/doc-variables>`__.
244244
If this field is missing or empty, a default subject line
245245
will be generated.
246+
links (MutableSequence[google.cloud.monitoring_v3.types.AlertPolicy.Documentation.Link]):
247+
Optional. Links to content such as playbooks,
248+
repositories, and other resources. This field
249+
can contain up to 3 entries.
246250
"""
247251

252+
class Link(proto.Message):
253+
r"""Links to content such as playbooks, repositories, and other
254+
resources.
255+
256+
Attributes:
257+
display_name (str):
258+
A short display name for the link. The
259+
display name must not be empty or exceed 63
260+
characters. Example: "playbook".
261+
url (str):
262+
The url of a webpage. A url can be templatized by using
263+
variables in the path or the query parameters. The total
264+
length of a URL should not exceed 2083 characters before and
265+
after variable expansion. Example:
266+
"https://my_domain.com/playbook?name=${resource.name}".
267+
"""
268+
269+
display_name: str = proto.Field(
270+
proto.STRING,
271+
number=1,
272+
)
273+
url: str = proto.Field(
274+
proto.STRING,
275+
number=2,
276+
)
277+
248278
content: str = proto.Field(
249279
proto.STRING,
250280
number=1,
@@ -257,6 +287,11 @@ class Documentation(proto.Message):
257287
proto.STRING,
258288
number=3,
259289
)
290+
links: MutableSequence["AlertPolicy.Documentation.Link"] = proto.RepeatedField(
291+
proto.MESSAGE,
292+
number=4,
293+
message="AlertPolicy.Documentation.Link",
294+
)
260295

261296
class Condition(proto.Message):
262297
r"""A condition is a true/false test that determines when an

0 commit comments

Comments
 (0)