google-apis-monitoring_v3 0.33.0 → 0.64.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.
@@ -32,6 +32,8 @@ module Google
32
32
  #
33
33
  # @see https://cloud.google.com/monitoring/api/
34
34
  class MonitoringService < Google::Apis::Core::BaseService
35
+ DEFAULT_ENDPOINT_TEMPLATE = "https://monitoring.$UNIVERSE_DOMAIN$/"
36
+
35
37
  # @return [String]
36
38
  # API key. Your API key identifies your project and provides you with API access,
37
39
  # quota, and reports. Required unless you provide an OAuth 2.0 token.
@@ -43,7 +45,7 @@ module Google
43
45
  attr_accessor :quota_user
44
46
 
45
47
  def initialize
46
- super('https://monitoring.googleapis.com/', '',
48
+ super(DEFAULT_ENDPOINT_TEMPLATE, '',
47
49
  client_name: 'google-apis-monitoring_v3',
48
50
  client_version: Google::Apis::MonitoringV3::GEM_VERSION)
49
51
  @batch_path = 'batch'
@@ -377,7 +379,9 @@ module Google
377
379
  execute_or_queue_command(command, &block)
378
380
  end
379
381
 
380
- # Creates a new alerting policy.
382
+ # Creates a new alerting policy.Design your application to single-thread API
383
+ # calls that modify the state of alerting policies in a single project. This
384
+ # includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.
381
385
  # @param [String] name
382
386
  # Required. The project (https://cloud.google.com/monitoring/api/v3#project_name)
383
387
  # in which to create the alerting policy. The format is: projects/[
@@ -418,7 +422,9 @@ module Google
418
422
  execute_or_queue_command(command, &block)
419
423
  end
420
424
 
421
- # Deletes an alerting policy.
425
+ # Deletes an alerting policy.Design your application to single-thread API calls
426
+ # that modify the state of alerting policies in a single project. This includes
427
+ # calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.
422
428
  # @param [String] name
423
429
  # Required. The alerting policy to delete. The format is: projects/[
424
430
  # PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] For more information,
@@ -538,7 +544,9 @@ module Google
538
544
  # Updates an alerting policy. You can either replace the entire policy with a
539
545
  # new one or replace only certain fields in the current alerting policy by
540
546
  # specifying the fields to be updated via updateMask. Returns the updated
541
- # alerting policy.
547
+ # alerting policy.Design your application to single-thread API calls that modify
548
+ # the state of alerting policies in a single project. This includes calls to
549
+ # CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.
542
550
  # @param [String] name
543
551
  # Required if the policy exists. The resource name for this policy. The format
544
552
  # is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] [
@@ -997,7 +1005,9 @@ module Google
997
1005
  # monitoring/custom-metrics): metric.type = starts_with("custom.googleapis.com/")
998
1006
  #
999
1007
  # @param [Fixnum] page_size
1000
- # A positive number that is the maximum number of results to return.
1008
+ # A positive number that is the maximum number of results to return. The default
1009
+ # and maximum value is 10,000. If a page_size <= 0 or > 10,000 is submitted,
1010
+ # will instead return a maximum of 10,000 results.
1001
1011
  # @param [String] page_token
1002
1012
  # If this field is not empty then it must contain the nextPageToken value
1003
1013
  # returned by a previous call to this method. Using this field causes the method
@@ -1188,7 +1198,11 @@ module Google
1188
1198
  end
1189
1199
 
1190
1200
  # Creates a new notification channel, representing a single notification
1191
- # endpoint such as an email address, SMS number, or PagerDuty service.
1201
+ # endpoint such as an email address, SMS number, or PagerDuty service.Design
1202
+ # your application to single-thread API calls that modify the state of
1203
+ # notification channels in a single project. This includes calls to
1204
+ # CreateNotificationChannel, DeleteNotificationChannel and
1205
+ # UpdateNotificationChannel.
1192
1206
  # @param [String] name
1193
1207
  # Required. The project (https://cloud.google.com/monitoring/api/v3#project_name)
1194
1208
  # on which to execute the request. The format is: projects/[
@@ -1226,7 +1240,10 @@ module Google
1226
1240
  execute_or_queue_command(command, &block)
1227
1241
  end
1228
1242
 
1229
- # Deletes a notification channel.
1243
+ # Deletes a notification channel.Design your application to single-thread API
1244
+ # calls that modify the state of notification channels in a single project. This
1245
+ # includes calls to CreateNotificationChannel, DeleteNotificationChannel and
1246
+ # UpdateNotificationChannel.
1230
1247
  # @param [String] name
1231
1248
  # Required. The channel for which to execute the request. The format is:
1232
1249
  # projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
@@ -1350,7 +1367,9 @@ module Google
1350
1367
  execute_or_queue_command(command, &block)
1351
1368
  end
1352
1369
 
1353
- # Lists the notification channels that have been created for the project.
1370
+ # Lists the notification channels that have been created for the project. To
1371
+ # list the types of notification channels that are supported, use the
1372
+ # ListNotificationChannelDescriptors method.
1354
1373
  # @param [String] name
1355
1374
  # Required. The project (https://cloud.google.com/monitoring/api/v3#project_name)
1356
1375
  # on which to execute the request. The format is: projects/[
@@ -1407,7 +1426,10 @@ module Google
1407
1426
  end
1408
1427
 
1409
1428
  # Updates a notification channel. Fields not specified in the field mask remain
1410
- # unchanged.
1429
+ # unchanged.Design your application to single-thread API calls that modify the
1430
+ # state of notification channels in a single project. This includes calls to
1431
+ # CreateNotificationChannel, DeleteNotificationChannel and
1432
+ # UpdateNotificationChannel.
1411
1433
  # @param [String] name
1412
1434
  # The full REST resource name for this channel. The format is: projects/[
1413
1435
  # PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] The [CHANNEL_ID] is
@@ -1513,9 +1535,178 @@ module Google
1513
1535
  execute_or_queue_command(command, &block)
1514
1536
  end
1515
1537
 
1538
+ # Creates a Snooze that will prevent alerts, which match the provided criteria,
1539
+ # from being opened. The Snooze applies for a specific time interval.
1540
+ # @param [String] parent
1541
+ # Required. The project (https://cloud.google.com/monitoring/api/v3#project_name)
1542
+ # in which a Snooze should be created. The format is: projects/[
1543
+ # PROJECT_ID_OR_NUMBER]
1544
+ # @param [Google::Apis::MonitoringV3::Snooze] snooze_object
1545
+ # @param [String] fields
1546
+ # Selector specifying which fields to include in a partial response.
1547
+ # @param [String] quota_user
1548
+ # Available to use for quota purposes for server-side applications. Can be any
1549
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1550
+ # @param [Google::Apis::RequestOptions] options
1551
+ # Request-specific options
1552
+ #
1553
+ # @yield [result, err] Result & error if block supplied
1554
+ # @yieldparam result [Google::Apis::MonitoringV3::Snooze] parsed result object
1555
+ # @yieldparam err [StandardError] error object if request failed
1556
+ #
1557
+ # @return [Google::Apis::MonitoringV3::Snooze]
1558
+ #
1559
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1560
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1561
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1562
+ def create_project_snooze(parent, snooze_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1563
+ command = make_simple_command(:post, 'v3/{+parent}/snoozes', options)
1564
+ command.request_representation = Google::Apis::MonitoringV3::Snooze::Representation
1565
+ command.request_object = snooze_object
1566
+ command.response_representation = Google::Apis::MonitoringV3::Snooze::Representation
1567
+ command.response_class = Google::Apis::MonitoringV3::Snooze
1568
+ command.params['parent'] = parent unless parent.nil?
1569
+ command.query['fields'] = fields unless fields.nil?
1570
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1571
+ execute_or_queue_command(command, &block)
1572
+ end
1573
+
1574
+ # Retrieves a Snooze by name.
1575
+ # @param [String] name
1576
+ # Required. The ID of the Snooze to retrieve. The format is: projects/[
1577
+ # PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID]
1578
+ # @param [String] fields
1579
+ # Selector specifying which fields to include in a partial response.
1580
+ # @param [String] quota_user
1581
+ # Available to use for quota purposes for server-side applications. Can be any
1582
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1583
+ # @param [Google::Apis::RequestOptions] options
1584
+ # Request-specific options
1585
+ #
1586
+ # @yield [result, err] Result & error if block supplied
1587
+ # @yieldparam result [Google::Apis::MonitoringV3::Snooze] parsed result object
1588
+ # @yieldparam err [StandardError] error object if request failed
1589
+ #
1590
+ # @return [Google::Apis::MonitoringV3::Snooze]
1591
+ #
1592
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1593
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1594
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1595
+ def get_project_snooze(name, fields: nil, quota_user: nil, options: nil, &block)
1596
+ command = make_simple_command(:get, 'v3/{+name}', options)
1597
+ command.response_representation = Google::Apis::MonitoringV3::Snooze::Representation
1598
+ command.response_class = Google::Apis::MonitoringV3::Snooze
1599
+ command.params['name'] = name unless name.nil?
1600
+ command.query['fields'] = fields unless fields.nil?
1601
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1602
+ execute_or_queue_command(command, &block)
1603
+ end
1604
+
1605
+ # Lists the Snoozes associated with a project. Can optionally pass in filter,
1606
+ # which specifies predicates to match Snoozes.
1607
+ # @param [String] parent
1608
+ # Required. The project (https://cloud.google.com/monitoring/api/v3#project_name)
1609
+ # whose Snoozes should be listed. The format is: projects/[PROJECT_ID_OR_NUMBER]
1610
+ #
1611
+ # @param [String] filter
1612
+ # Optional. Optional filter to restrict results to the given criteria. The
1613
+ # following fields are supported. interval.start_time interval.end_timeFor
1614
+ # example: ``` interval.start_time > "2022-03-11T00:00:00-08:00" AND interval.
1615
+ # end_time < "2022-03-12T00:00:00-08:00" ```
1616
+ # @param [Fixnum] page_size
1617
+ # Optional. The maximum number of results to return for a single query. The
1618
+ # server may further constrain the maximum number of results returned in a
1619
+ # single page. The value should be in the range 1, 1000. If the value given is
1620
+ # outside this range, the server will decide the number of results to be
1621
+ # returned.
1622
+ # @param [String] page_token
1623
+ # Optional. The next_page_token from a previous call to ListSnoozesRequest to
1624
+ # get the next page of results.
1625
+ # @param [String] fields
1626
+ # Selector specifying which fields to include in a partial response.
1627
+ # @param [String] quota_user
1628
+ # Available to use for quota purposes for server-side applications. Can be any
1629
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1630
+ # @param [Google::Apis::RequestOptions] options
1631
+ # Request-specific options
1632
+ #
1633
+ # @yield [result, err] Result & error if block supplied
1634
+ # @yieldparam result [Google::Apis::MonitoringV3::ListSnoozesResponse] parsed result object
1635
+ # @yieldparam err [StandardError] error object if request failed
1636
+ #
1637
+ # @return [Google::Apis::MonitoringV3::ListSnoozesResponse]
1638
+ #
1639
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1640
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1641
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1642
+ def list_project_snoozes(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1643
+ command = make_simple_command(:get, 'v3/{+parent}/snoozes', options)
1644
+ command.response_representation = Google::Apis::MonitoringV3::ListSnoozesResponse::Representation
1645
+ command.response_class = Google::Apis::MonitoringV3::ListSnoozesResponse
1646
+ command.params['parent'] = parent unless parent.nil?
1647
+ command.query['filter'] = filter unless filter.nil?
1648
+ command.query['pageSize'] = page_size unless page_size.nil?
1649
+ command.query['pageToken'] = page_token unless page_token.nil?
1650
+ command.query['fields'] = fields unless fields.nil?
1651
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1652
+ execute_or_queue_command(command, &block)
1653
+ end
1654
+
1655
+ # Updates a Snooze, identified by its name, with the parameters in the given
1656
+ # Snooze object.
1657
+ # @param [String] name
1658
+ # Required. Identifier. The name of the Snooze. The format is: projects/[
1659
+ # PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be
1660
+ # generated by the system.
1661
+ # @param [Google::Apis::MonitoringV3::Snooze] snooze_object
1662
+ # @param [String] update_mask
1663
+ # Required. The fields to update.For each field listed in update_mask: If the
1664
+ # Snooze object supplied in the UpdateSnoozeRequest has a value for that field,
1665
+ # the value of the field in the existing Snooze will be set to the value of the
1666
+ # field in the supplied Snooze. If the field does not have a value in the
1667
+ # supplied Snooze, the field in the existing Snooze is set to its default value.
1668
+ # Fields not listed retain their existing value.The following are the field
1669
+ # names that are accepted in update_mask: display_name interval.start_time
1670
+ # interval.end_timeThat said, the start time and end time of the Snooze
1671
+ # determines which fields can legally be updated. Before attempting an update,
1672
+ # users should consult the documentation for UpdateSnoozeRequest, which talks
1673
+ # about which fields can be updated.
1674
+ # @param [String] fields
1675
+ # Selector specifying which fields to include in a partial response.
1676
+ # @param [String] quota_user
1677
+ # Available to use for quota purposes for server-side applications. Can be any
1678
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1679
+ # @param [Google::Apis::RequestOptions] options
1680
+ # Request-specific options
1681
+ #
1682
+ # @yield [result, err] Result & error if block supplied
1683
+ # @yieldparam result [Google::Apis::MonitoringV3::Snooze] parsed result object
1684
+ # @yieldparam err [StandardError] error object if request failed
1685
+ #
1686
+ # @return [Google::Apis::MonitoringV3::Snooze]
1687
+ #
1688
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1689
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1690
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1691
+ def patch_project_snooze(name, snooze_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1692
+ command = make_simple_command(:patch, 'v3/{+name}', options)
1693
+ command.request_representation = Google::Apis::MonitoringV3::Snooze::Representation
1694
+ command.request_object = snooze_object
1695
+ command.response_representation = Google::Apis::MonitoringV3::Snooze::Representation
1696
+ command.response_class = Google::Apis::MonitoringV3::Snooze
1697
+ command.params['name'] = name unless name.nil?
1698
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1699
+ command.query['fields'] = fields unless fields.nil?
1700
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1701
+ execute_or_queue_command(command, &block)
1702
+ end
1703
+
1516
1704
  # Creates or adds data to one or more time series. The response is empty if all
1517
1705
  # time series in the request were written. If any time series could not be
1518
1706
  # written, a corresponding failure message is included in the error response.
1707
+ # This method does not support resource locations constraint of an organization
1708
+ # policy (https://cloud.google.com/resource-manager/docs/organization-policy/
1709
+ # defining-locations#setting_the_organization_policy).
1519
1710
  # @param [String] name
1520
1711
  # Required. The project (https://cloud.google.com/monitoring/api/v3#project_name)
1521
1712
  # on which to execute the request. The format is: projects/[
@@ -1943,10 +2134,10 @@ module Google
1943
2134
  # configuration by specifying the fields to be updated via updateMask. Returns
1944
2135
  # the updated configuration.
1945
2136
  # @param [String] name
1946
- # A unique resource name for this Uptime check configuration. The format is:
1947
- # projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] [
1948
- # PROJECT_ID_OR_NUMBER] is the Workspace host project associated with the Uptime
1949
- # check.This field should be omitted when creating the Uptime check
2137
+ # Identifier. A unique resource name for this Uptime check configuration. The
2138
+ # format is: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
2139
+ # [PROJECT_ID_OR_NUMBER] is the Workspace host project associated with the
2140
+ # Uptime check.This field should be omitted when creating the Uptime check
1950
2141
  # configuration; on create, the resource name is assigned by the server and
1951
2142
  # included in the response.
1952
2143
  # @param [Google::Apis::MonitoringV3::UptimeCheckConfig] uptime_check_config_object
@@ -2147,8 +2338,8 @@ module Google
2147
2338
 
2148
2339
  # Update this Service.
2149
2340
  # @param [String] name
2150
- # Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/
2151
- # services/[SERVICE_ID]
2341
+ # Identifier. Resource name for this Service. The format is: projects/[
2342
+ # PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]
2152
2343
  # @param [Google::Apis::MonitoringV3::Service] service_object
2153
2344
  # @param [String] update_mask
2154
2345
  # A set of field paths defining which fields to use for the update.
@@ -2189,7 +2380,8 @@ module Google
2189
2380
  # @param [Google::Apis::MonitoringV3::ServiceLevelObjective] service_level_objective_object
2190
2381
  # @param [String] service_level_objective_id
2191
2382
  # Optional. The ServiceLevelObjective id to use for this ServiceLevelObjective.
2192
- # If omitted, an id will be generated instead. Must match the pattern [a-z0-9\-]+
2383
+ # If omitted, an id will be generated instead. Must match the pattern ^[a-zA-Z0-
2384
+ # 9-_:.]+$
2193
2385
  # @param [String] fields
2194
2386
  # Selector specifying which fields to include in a partial response.
2195
2387
  # @param [String] quota_user
@@ -2343,8 +2535,9 @@ module Google
2343
2535
 
2344
2536
  # Update the given ServiceLevelObjective.
2345
2537
  # @param [String] name
2346
- # Resource name for this ServiceLevelObjective. The format is: projects/[
2347
- # PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
2538
+ # Identifier. Resource name for this ServiceLevelObjective. The format is:
2539
+ # projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[
2540
+ # SLO_NAME]
2348
2541
  # @param [Google::Apis::MonitoringV3::ServiceLevelObjective] service_level_objective_object
2349
2542
  # @param [String] update_mask
2350
2543
  # A set of field paths defining which fields to use for the update.
@@ -2378,7 +2571,7 @@ module Google
2378
2571
  execute_or_queue_command(command, &block)
2379
2572
  end
2380
2573
 
2381
- # Returns the list of IP addresses that checkers run from
2574
+ # Returns the list of IP addresses that checkers run from.
2382
2575
  # @param [Fixnum] page_size
2383
2576
  # The maximum number of results to return in a single response. The server may
2384
2577
  # further constrain the maximum number of results returned in a single page. If
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-monitoring_v3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.33.0
4
+ version: 0.64.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-29 00:00:00.000000000 Z
11
+ date: 2024-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: 0.15.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.7'
29
+ version: 0.15.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-monitoring_v3/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-monitoring_v3/v0.33.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-monitoring_v3/v0.64.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-monitoring_v3
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -68,14 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
- version: '2.5'
71
+ version: '2.7'
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.3.14
78
+ rubygems_version: 3.5.6
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Cloud Monitoring API V3