2727 "UptimeCheckRegion" ,
2828 "GroupResourceType" ,
2929 "InternalChecker" ,
30+ "SyntheticMonitorTarget" ,
3031 "UptimeCheckConfig" ,
3132 "UptimeCheckIp" ,
3233 },
@@ -188,6 +189,52 @@ class State(proto.Enum):
188189 )
189190
190191
192+ class SyntheticMonitorTarget (proto .Message ):
193+ r"""Describes a Synthetic Monitor to be invoked by Uptime.
194+
195+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
196+
197+ Attributes:
198+ cloud_function_v2 (google.cloud.monitoring_v3.types.SyntheticMonitorTarget.CloudFunctionV2Target):
199+ Target a Synthetic Monitor GCFv2 instance.
200+
201+ This field is a member of `oneof`_ ``target``.
202+ """
203+
204+ class CloudFunctionV2Target (proto .Message ):
205+ r"""A Synthetic Monitor deployed to a Cloud Functions V2
206+ instance.
207+
208+ Attributes:
209+ name (str):
210+ Required. Fully qualified GCFv2 resource name i.e.
211+ ``projects/{project}/locations/{location}/functions/{function}``
212+ Required.
213+ cloud_run_revision (google.api.monitored_resource_pb2.MonitoredResource):
214+ Output only. The ``cloud_run_revision`` Monitored Resource
215+ associated with the GCFv2. The Synthetic Monitor execution
216+ results (metrics, logs, and spans) are reported against this
217+ Monitored Resource. This field is output only.
218+ """
219+
220+ name : str = proto .Field (
221+ proto .STRING ,
222+ number = 1 ,
223+ )
224+ cloud_run_revision : monitored_resource_pb2 .MonitoredResource = proto .Field (
225+ proto .MESSAGE ,
226+ number = 2 ,
227+ message = monitored_resource_pb2 .MonitoredResource ,
228+ )
229+
230+ cloud_function_v2 : CloudFunctionV2Target = proto .Field (
231+ proto .MESSAGE ,
232+ number = 1 ,
233+ oneof = "target" ,
234+ message = CloudFunctionV2Target ,
235+ )
236+
237+
191238class UptimeCheckConfig (proto .Message ):
192239 r"""This message configures which resources and services to
193240 monitor for availability.
@@ -201,8 +248,8 @@ class UptimeCheckConfig(proto.Message):
201248
202249 Attributes:
203250 name (str):
204- A unique resource name for this Uptime check configuration.
205- The format is:
251+ Identifier. A unique resource name for this Uptime check
252+ configuration. The format is:
206253
207254 ::
208255
@@ -234,6 +281,10 @@ class UptimeCheckConfig(proto.Message):
234281 The group resource associated with the
235282 configuration.
236283
284+ This field is a member of `oneof`_ ``resource``.
285+ synthetic_monitor (google.cloud.monitoring_v3.types.SyntheticMonitorTarget):
286+ Specifies a Synthetic Monitor to invoke.
287+
237288 This field is a member of `oneof`_ ``resource``.
238289 http_check (google.cloud.monitoring_v3.types.UptimeCheckConfig.HttpCheck):
239290 Contains information needed to make an HTTP
@@ -361,6 +412,8 @@ class PingConfig(proto.Message):
361412 class HttpCheck (proto .Message ):
362413 r"""Information involved in an HTTP/HTTPS Uptime check request.
363414
415+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
416+
364417 Attributes:
365418 request_method (google.cloud.monitoring_v3.types.UptimeCheckConfig.HttpCheck.RequestMethod):
366419 The HTTP request method to use for the check. If set to
@@ -381,8 +434,9 @@ class HttpCheck(proto.Message):
381434 host (specified within the ``monitored_resource``) and
382435 ``path`` to construct the full URL.
383436 auth_info (google.cloud.monitoring_v3.types.UptimeCheckConfig.HttpCheck.BasicAuthentication):
384- The authentication information. Optional when
385- creating an HTTP check; defaults to empty.
437+ The authentication information. Optional when creating an
438+ HTTP check; defaults to empty. Do not set both
439+ ``auth_method`` and ``auth_info``.
386440 mask_headers (bool):
387441 Boolean specifying whether to encrypt the header
388442 information. Encryption should be specified for any headers
@@ -453,6 +507,12 @@ class HttpCheck(proto.Message):
453507 ping_config (google.cloud.monitoring_v3.types.UptimeCheckConfig.PingConfig):
454508 Contains information needed to add pings to
455509 an HTTP check.
510+ service_agent_authentication (google.cloud.monitoring_v3.types.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication):
511+ If specified, Uptime will generate and attach an OIDC JWT
512+ token for the Monitoring service agent service account as an
513+ ``Authorization`` header in the HTTP request when probing.
514+
515+ This field is a member of `oneof`_ ``auth_method``.
456516 """
457517
458518 class RequestMethod (proto .Enum ):
@@ -580,6 +640,36 @@ class StatusClass(proto.Enum):
580640 enum = "UptimeCheckConfig.HttpCheck.ResponseStatusCode.StatusClass" ,
581641 )
582642
643+ class ServiceAgentAuthentication (proto .Message ):
644+ r"""Contains information needed for generating an `OpenID Connect
645+ token <https://developers.google.com/identity/protocols/OpenIDConnect>`__.
646+ The OIDC token will be generated for the Monitoring service agent
647+ service account.
648+
649+ Attributes:
650+ type_ (google.cloud.monitoring_v3.types.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType):
651+ Type of authentication.
652+ """
653+
654+ class ServiceAgentAuthenticationType (proto .Enum ):
655+ r"""Type of authentication.
656+
657+ Values:
658+ SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED (0):
659+ Default value, will result in OIDC
660+ Authentication.
661+ OIDC_TOKEN (1):
662+ OIDC Authentication
663+ """
664+ SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED = 0
665+ OIDC_TOKEN = 1
666+
667+ type_ : "UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType" = proto .Field (
668+ proto .ENUM ,
669+ number = 1 ,
670+ enum = "UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType" ,
671+ )
672+
583673 request_method : "UptimeCheckConfig.HttpCheck.RequestMethod" = proto .Field (
584674 proto .ENUM ,
585675 number = 8 ,
@@ -640,6 +730,12 @@ class StatusClass(proto.Enum):
640730 number = 12 ,
641731 message = "UptimeCheckConfig.PingConfig" ,
642732 )
733+ service_agent_authentication : "UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication" = proto .Field (
734+ proto .MESSAGE ,
735+ number = 14 ,
736+ oneof = "auth_method" ,
737+ message = "UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication" ,
738+ )
643739
644740 class TcpCheck (proto .Message ):
645741 r"""Information required for a TCP Uptime check request.
@@ -816,6 +912,12 @@ class JsonPathMatcherOption(proto.Enum):
816912 oneof = "resource" ,
817913 message = ResourceGroup ,
818914 )
915+ synthetic_monitor : "SyntheticMonitorTarget" = proto .Field (
916+ proto .MESSAGE ,
917+ number = 21 ,
918+ oneof = "resource" ,
919+ message = "SyntheticMonitorTarget" ,
920+ )
819921 http_check : HttpCheck = proto .Field (
820922 proto .MESSAGE ,
821923 number = 5 ,
0 commit comments