google-apis-monitoring_v3 0.82.0 → 0.83.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7a46434d740def7ca77372a68fb09014ba9da049f8fc22448cbd3b0b4632d7d
4
- data.tar.gz: 9d6e726e05f23c39335bdd21da1b1bdc347a199f198ce639b6e77209f51ebb7e
3
+ metadata.gz: f501bf2830f349597646bb1aed1a7c1837016fdb87cd279c30ec16f82766823b
4
+ data.tar.gz: 43e57acdc201794071fb5293d4c9e0606154af3f399ebab94b1424730ccf78d1
5
5
  SHA512:
6
- metadata.gz: 7c8d8fd8c605888526577e0faec2b7953479c43e9b1844f1e77ff59a57e4807096b516b618e0fa73f29f626c88b41f0b61c09b597e48c41a388609fb77da004f
7
- data.tar.gz: a9dcd07195da31d0a42aeb93128b00b7598cb443b8f86db8766d85a3c068a046e316b09945551bab65299b614a2d571256bf1fdf7e41bf994515a69d1a6622f9
6
+ metadata.gz: f5d9a441703069e3f18cde02af54d0e1aba5f4769f6a46ae6876baae9fa40314adb0bcbfcbf505c65b6ce11f5658758648be85be4c380e5f16730bc3c6a9f2bd
7
+ data.tar.gz: 3498acfa1e52608aa55a5b1981850a16da0f08ea337554ffb8da094320a50fd352403ae3785de11b45c2c4947c0d66a42c63626aeff4fa1b743b1f669cdce966
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-monitoring_v3
2
2
 
3
+ ### v0.83.0 (2025-10-12)
4
+
5
+ * Regenerated from discovery document revision 20251006
6
+
3
7
  ### v0.82.0 (2025-08-10)
4
8
 
5
9
  * Regenerated from discovery document revision 20250731
@@ -116,6 +116,90 @@ module Google
116
116
  end
117
117
  end
118
118
 
119
+ # An alert is the representation of a violation of an alert policy. It is a read-
120
+ # only resource that cannot be modified by the accompanied API.
121
+ class Alert
122
+ include Google::Apis::Core::Hashable
123
+
124
+ # The time when the alert was closed.
125
+ # Corresponds to the JSON property `closeTime`
126
+ # @return [String]
127
+ attr_accessor :close_time
128
+
129
+ # Information about the log for log-based alerts.
130
+ # Corresponds to the JSON property `log`
131
+ # @return [Google::Apis::MonitoringV3::LogMetadata]
132
+ attr_accessor :log
133
+
134
+ # Auxiliary metadata for a MonitoredResource object. MonitoredResource objects
135
+ # contain the minimum set of information to uniquely identify a monitored
136
+ # resource instance. There is some other useful auxiliary metadata. Monitoring
137
+ # and Logging use an ingestion pipeline to extract metadata for cloud resources
138
+ # of all types, and store the metadata in this message.
139
+ # Corresponds to the JSON property `metadata`
140
+ # @return [Google::Apis::MonitoringV3::MonitoredResourceMetadata]
141
+ attr_accessor :metadata
142
+
143
+ # A specific metric, identified by specifying values for all of the labels of a
144
+ # MetricDescriptor.
145
+ # Corresponds to the JSON property `metric`
146
+ # @return [Google::Apis::MonitoringV3::Metric]
147
+ attr_accessor :metric
148
+
149
+ # Identifier. The name of the alert.The format is: projects/[
150
+ # PROJECT_ID_OR_NUMBER]/alerts/[ALERT_ID] The [ALERT_ID] is a system-assigned
151
+ # unique identifier for the alert.
152
+ # Corresponds to the JSON property `name`
153
+ # @return [String]
154
+ attr_accessor :name
155
+
156
+ # The time when the alert was opened.
157
+ # Corresponds to the JSON property `openTime`
158
+ # @return [String]
159
+ attr_accessor :open_time
160
+
161
+ # The state of the policy at the time the alert was generated.
162
+ # Corresponds to the JSON property `policy`
163
+ # @return [Google::Apis::MonitoringV3::PolicySnapshot]
164
+ attr_accessor :policy
165
+
166
+ # An object representing a resource that can be used for monitoring, logging,
167
+ # billing, or other purposes. Examples include virtual machine instances,
168
+ # databases, and storage devices such as disks. The type field identifies a
169
+ # MonitoredResourceDescriptor object that describes the resource's schema.
170
+ # Information in the labels field identifies the actual resource and its
171
+ # attributes according to the schema. For example, a particular Compute Engine
172
+ # VM instance could be represented by the following object, because the
173
+ # MonitoredResourceDescriptor for "gce_instance" has labels "project_id", "
174
+ # instance_id" and "zone": ` "type": "gce_instance", "labels": ` "project_id": "
175
+ # my-project", "instance_id": "12345678901234", "zone": "us-central1-a" ``
176
+ # Corresponds to the JSON property `resource`
177
+ # @return [Google::Apis::MonitoringV3::MonitoredResource]
178
+ attr_accessor :resource
179
+
180
+ # Output only. The current state of the alert.
181
+ # Corresponds to the JSON property `state`
182
+ # @return [String]
183
+ attr_accessor :state
184
+
185
+ def initialize(**args)
186
+ update!(**args)
187
+ end
188
+
189
+ # Update properties of this object
190
+ def update!(**args)
191
+ @close_time = args[:close_time] if args.key?(:close_time)
192
+ @log = args[:log] if args.key?(:log)
193
+ @metadata = args[:metadata] if args.key?(:metadata)
194
+ @metric = args[:metric] if args.key?(:metric)
195
+ @name = args[:name] if args.key?(:name)
196
+ @open_time = args[:open_time] if args.key?(:open_time)
197
+ @policy = args[:policy] if args.key?(:policy)
198
+ @resource = args[:resource] if args.key?(:resource)
199
+ @state = args[:state] if args.key?(:state)
200
+ end
201
+ end
202
+
119
203
  # A description of the conditions under which some aspect of your system is
120
204
  # considered to be "unhealthy" and the ways to notify people or services about
121
205
  # this state. For an overview of alerting policies, see Introduction to Alerting
@@ -2407,6 +2491,41 @@ module Google
2407
2491
  end
2408
2492
  end
2409
2493
 
2494
+ # The ListAlerts response.
2495
+ class ListAlertsResponse
2496
+ include Google::Apis::Core::Hashable
2497
+
2498
+ # The list of alerts.
2499
+ # Corresponds to the JSON property `alerts`
2500
+ # @return [Array<Google::Apis::MonitoringV3::Alert>]
2501
+ attr_accessor :alerts
2502
+
2503
+ # If not empty, indicates that there may be more results that match the request.
2504
+ # Use the value in the page_token field in a subsequent request to fetch the
2505
+ # next set of results. The token is encrypted and only guaranteed to return
2506
+ # correct results for 72 hours after it is created. If empty, all results have
2507
+ # been returned.
2508
+ # Corresponds to the JSON property `nextPageToken`
2509
+ # @return [String]
2510
+ attr_accessor :next_page_token
2511
+
2512
+ # The estimated total number of matching results for this query.
2513
+ # Corresponds to the JSON property `totalSize`
2514
+ # @return [Fixnum]
2515
+ attr_accessor :total_size
2516
+
2517
+ def initialize(**args)
2518
+ update!(**args)
2519
+ end
2520
+
2521
+ # Update properties of this object
2522
+ def update!(**args)
2523
+ @alerts = args[:alerts] if args.key?(:alerts)
2524
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2525
+ @total_size = args[:total_size] if args.key?(:total_size)
2526
+ end
2527
+ end
2528
+
2410
2529
  # The ListGroupMembers response.
2411
2530
  class ListGroupMembersResponse
2412
2531
  include Google::Apis::Core::Hashable
@@ -2819,6 +2938,25 @@ module Google
2819
2938
  end
2820
2939
  end
2821
2940
 
2941
+ # Information about the log for log-based alerts.
2942
+ class LogMetadata
2943
+ include Google::Apis::Core::Hashable
2944
+
2945
+ # The labels extracted from the log.
2946
+ # Corresponds to the JSON property `extractedLabels`
2947
+ # @return [Hash<String,String>]
2948
+ attr_accessor :extracted_labels
2949
+
2950
+ def initialize(**args)
2951
+ update!(**args)
2952
+ end
2953
+
2954
+ # Update properties of this object
2955
+ def update!(**args)
2956
+ @extracted_labels = args[:extracted_labels] if args.key?(:extracted_labels)
2957
+ end
2958
+ end
2959
+
2822
2960
  # Istio service scoped to an Istio mesh. Anthos clusters running ASM < 1.6.8
2823
2961
  # will have their services ingested as this type.
2824
2962
  class MeshIstio
@@ -3958,6 +4096,44 @@ module Google
3958
4096
  end
3959
4097
  end
3960
4098
 
4099
+ # The state of the policy at the time the alert was generated.
4100
+ class PolicySnapshot
4101
+ include Google::Apis::Core::Hashable
4102
+
4103
+ # The display name of the alert policy.
4104
+ # Corresponds to the JSON property `displayName`
4105
+ # @return [String]
4106
+ attr_accessor :display_name
4107
+
4108
+ # The name of the alert policy resource. In the form of "projects/
4109
+ # PROJECT_ID_OR_NUMBER/alertPolicies/ALERT_POLICY_ID".
4110
+ # Corresponds to the JSON property `name`
4111
+ # @return [String]
4112
+ attr_accessor :name
4113
+
4114
+ # The severity of the alert policy.
4115
+ # Corresponds to the JSON property `severity`
4116
+ # @return [String]
4117
+ attr_accessor :severity
4118
+
4119
+ # The user labels for the alert policy.
4120
+ # Corresponds to the JSON property `userLabels`
4121
+ # @return [Hash<String,String>]
4122
+ attr_accessor :user_labels
4123
+
4124
+ def initialize(**args)
4125
+ update!(**args)
4126
+ end
4127
+
4128
+ # Update properties of this object
4129
+ def update!(**args)
4130
+ @display_name = args[:display_name] if args.key?(:display_name)
4131
+ @name = args[:name] if args.key?(:name)
4132
+ @severity = args[:severity] if args.key?(:severity)
4133
+ @user_labels = args[:user_labels] if args.key?(:user_labels)
4134
+ end
4135
+ end
4136
+
3961
4137
  # A condition type that allows alerting policies to be defined using Prometheus
3962
4138
  # Query Language (PromQL) (https://prometheus.io/docs/prometheus/latest/querying/
3963
4139
  # basics/).The PrometheusQueryLanguageCondition message contains information
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module MonitoringV3
18
18
  # Version of the google-apis-monitoring_v3 gem
19
- GEM_VERSION = "0.82.0"
19
+ GEM_VERSION = "0.83.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.18.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20250731"
25
+ REVISION = "20251006"
26
26
  end
27
27
  end
28
28
  end
@@ -28,6 +28,12 @@ module Google
28
28
  include Google::Apis::Core::JsonObjectSupport
29
29
  end
30
30
 
31
+ class Alert
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
31
37
  class AlertPolicy
32
38
  class Representation < Google::Apis::Core::JsonRepresentation; end
33
39
 
@@ -358,6 +364,12 @@ module Google
358
364
  include Google::Apis::Core::JsonObjectSupport
359
365
  end
360
366
 
367
+ class ListAlertsResponse
368
+ class Representation < Google::Apis::Core::JsonRepresentation; end
369
+
370
+ include Google::Apis::Core::JsonObjectSupport
371
+ end
372
+
361
373
  class ListGroupMembersResponse
362
374
  class Representation < Google::Apis::Core::JsonRepresentation; end
363
375
 
@@ -436,6 +448,12 @@ module Google
436
448
  include Google::Apis::Core::JsonObjectSupport
437
449
  end
438
450
 
451
+ class LogMetadata
452
+ class Representation < Google::Apis::Core::JsonRepresentation; end
453
+
454
+ include Google::Apis::Core::JsonObjectSupport
455
+ end
456
+
439
457
  class MeshIstio
440
458
  class Representation < Google::Apis::Core::JsonRepresentation; end
441
459
 
@@ -574,6 +592,12 @@ module Google
574
592
  include Google::Apis::Core::JsonObjectSupport
575
593
  end
576
594
 
595
+ class PolicySnapshot
596
+ class Representation < Google::Apis::Core::JsonRepresentation; end
597
+
598
+ include Google::Apis::Core::JsonObjectSupport
599
+ end
600
+
577
601
  class PrometheusQueryLanguageCondition
578
602
  class Representation < Google::Apis::Core::JsonRepresentation; end
579
603
 
@@ -794,6 +818,26 @@ module Google
794
818
  end
795
819
  end
796
820
 
821
+ class Alert
822
+ # @private
823
+ class Representation < Google::Apis::Core::JsonRepresentation
824
+ property :close_time, as: 'closeTime'
825
+ property :log, as: 'log', class: Google::Apis::MonitoringV3::LogMetadata, decorator: Google::Apis::MonitoringV3::LogMetadata::Representation
826
+
827
+ property :metadata, as: 'metadata', class: Google::Apis::MonitoringV3::MonitoredResourceMetadata, decorator: Google::Apis::MonitoringV3::MonitoredResourceMetadata::Representation
828
+
829
+ property :metric, as: 'metric', class: Google::Apis::MonitoringV3::Metric, decorator: Google::Apis::MonitoringV3::Metric::Representation
830
+
831
+ property :name, as: 'name'
832
+ property :open_time, as: 'openTime'
833
+ property :policy, as: 'policy', class: Google::Apis::MonitoringV3::PolicySnapshot, decorator: Google::Apis::MonitoringV3::PolicySnapshot::Representation
834
+
835
+ property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation
836
+
837
+ property :state, as: 'state'
838
+ end
839
+ end
840
+
797
841
  class AlertPolicy
798
842
  # @private
799
843
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1351,6 +1395,16 @@ module Google
1351
1395
  end
1352
1396
  end
1353
1397
 
1398
+ class ListAlertsResponse
1399
+ # @private
1400
+ class Representation < Google::Apis::Core::JsonRepresentation
1401
+ collection :alerts, as: 'alerts', class: Google::Apis::MonitoringV3::Alert, decorator: Google::Apis::MonitoringV3::Alert::Representation
1402
+
1403
+ property :next_page_token, as: 'nextPageToken'
1404
+ property :total_size, as: 'totalSize'
1405
+ end
1406
+ end
1407
+
1354
1408
  class ListGroupMembersResponse
1355
1409
  # @private
1356
1410
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1474,6 +1528,13 @@ module Google
1474
1528
  end
1475
1529
  end
1476
1530
 
1531
+ class LogMetadata
1532
+ # @private
1533
+ class Representation < Google::Apis::Core::JsonRepresentation
1534
+ hash :extracted_labels, as: 'extractedLabels'
1535
+ end
1536
+ end
1537
+
1477
1538
  class MeshIstio
1478
1539
  # @private
1479
1540
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1718,6 +1779,16 @@ module Google
1718
1779
  end
1719
1780
  end
1720
1781
 
1782
+ class PolicySnapshot
1783
+ # @private
1784
+ class Representation < Google::Apis::Core::JsonRepresentation
1785
+ property :display_name, as: 'displayName'
1786
+ property :name, as: 'name'
1787
+ property :severity, as: 'severity'
1788
+ hash :user_labels, as: 'userLabels'
1789
+ end
1790
+ end
1791
+
1721
1792
  class PrometheusQueryLanguageCondition
1722
1793
  # @private
1723
1794
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -601,6 +601,89 @@ module Google
601
601
  execute_or_queue_command(command, &block)
602
602
  end
603
603
 
604
+ # Gets a single alert.
605
+ # @param [String] name
606
+ # Required. The name of the alert.The format is: projects/[PROJECT_ID_OR_NUMBER]/
607
+ # alerts/[ALERT_ID] The [ALERT_ID] is a system-assigned unique identifier for
608
+ # the alert.
609
+ # @param [String] fields
610
+ # Selector specifying which fields to include in a partial response.
611
+ # @param [String] quota_user
612
+ # Available to use for quota purposes for server-side applications. Can be any
613
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
614
+ # @param [Google::Apis::RequestOptions] options
615
+ # Request-specific options
616
+ #
617
+ # @yield [result, err] Result & error if block supplied
618
+ # @yieldparam result [Google::Apis::MonitoringV3::Alert] parsed result object
619
+ # @yieldparam err [StandardError] error object if request failed
620
+ #
621
+ # @return [Google::Apis::MonitoringV3::Alert]
622
+ #
623
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
624
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
625
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
626
+ def get_project_alert(name, fields: nil, quota_user: nil, options: nil, &block)
627
+ command = make_simple_command(:get, 'v3/{+name}', options)
628
+ command.response_representation = Google::Apis::MonitoringV3::Alert::Representation
629
+ command.response_class = Google::Apis::MonitoringV3::Alert
630
+ command.params['name'] = name unless name.nil?
631
+ command.query['fields'] = fields unless fields.nil?
632
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
633
+ execute_or_queue_command(command, &block)
634
+ end
635
+
636
+ # Lists the existing alerts for the metrics scope of the project.
637
+ # @param [String] parent
638
+ # Required. The name of the project to list alerts for.
639
+ # @param [String] filter
640
+ # Optional. An alert is returned if there is a match on any fields belonging to
641
+ # the alert or its subfields.
642
+ # @param [String] order_by
643
+ # Optional. A comma-separated list of fields in Alert to use for sorting. The
644
+ # default sort direction is ascending. To specify descending order for a field,
645
+ # add a desc modifier. The following fields are supported: open_time
646
+ # close_timeFor example, close_time desc, open_time will return the alerts
647
+ # closed most recently, with ties broken in the order of older alerts listed
648
+ # first.If the field is not set, the results are sorted by open_time desc.
649
+ # @param [Fixnum] page_size
650
+ # Optional. The maximum number of results to return in a single response. If not
651
+ # set to a positive number, at most 50 alerts will be returned. The maximum
652
+ # value is 1000; values above 1000 will be coerced to 1000.
653
+ # @param [String] page_token
654
+ # Optional. If non-empty, page_token must contain a value returned as the
655
+ # next_page_token in a previous response to request the next set of results.
656
+ # @param [String] fields
657
+ # Selector specifying which fields to include in a partial response.
658
+ # @param [String] quota_user
659
+ # Available to use for quota purposes for server-side applications. Can be any
660
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
661
+ # @param [Google::Apis::RequestOptions] options
662
+ # Request-specific options
663
+ #
664
+ # @yield [result, err] Result & error if block supplied
665
+ # @yieldparam result [Google::Apis::MonitoringV3::ListAlertsResponse] parsed result object
666
+ # @yieldparam err [StandardError] error object if request failed
667
+ #
668
+ # @return [Google::Apis::MonitoringV3::ListAlertsResponse]
669
+ #
670
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
671
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
672
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
673
+ def list_project_alerts(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
674
+ command = make_simple_command(:get, 'v3/{+parent}/alerts', options)
675
+ command.response_representation = Google::Apis::MonitoringV3::ListAlertsResponse::Representation
676
+ command.response_class = Google::Apis::MonitoringV3::ListAlertsResponse
677
+ command.params['parent'] = parent unless parent.nil?
678
+ command.query['filter'] = filter unless filter.nil?
679
+ command.query['orderBy'] = order_by unless order_by.nil?
680
+ command.query['pageSize'] = page_size unless page_size.nil?
681
+ command.query['pageToken'] = page_token unless page_token.nil?
682
+ command.query['fields'] = fields unless fields.nil?
683
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
684
+ execute_or_queue_command(command, &block)
685
+ end
686
+
604
687
  # Cloud Monitoring Agent only: Creates a new time series.This method is only for
605
688
  # use by the Cloud Monitoring Agent. Use projects.timeSeries.create instead.
606
689
  # @param [String] name
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-monitoring_v3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.82.0
4
+ version: 0.83.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -57,7 +57,7 @@ licenses:
57
57
  metadata:
58
58
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
59
59
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-monitoring_v3/CHANGELOG.md
60
- documentation_uri: https://googleapis.dev/ruby/google-apis-monitoring_v3/v0.82.0
60
+ documentation_uri: https://googleapis.dev/ruby/google-apis-monitoring_v3/v0.83.0
61
61
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-monitoring_v3
62
62
  rdoc_options: []
63
63
  require_paths: