google-apis-logging_v2 0.20.0 → 0.24.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: 7d51dde77778d7084f4b9d0dbdb1fb11b6d3080acb35333599274c5bfc68b977
4
- data.tar.gz: c35b0e9ffb2df51c3b22905a6728cd98da7410ca5396ed859556850e77ce005f
3
+ metadata.gz: 97bf17ac0ea103f234acd6538e84f10cd7183efb3d52f1ac620b3ed34488e158
4
+ data.tar.gz: c4152353e12970ffa5d4367e11090e6e5bc12e80f34f07908a24128fe05430c7
5
5
  SHA512:
6
- metadata.gz: 3a4e839f90b532ca8088b83f85bac7f0417bf70c82439023036fd15b7c8ad7408ef8129c6594294a96309534e491519ed519d670e356c3bd22d8cd0898051ce6
7
- data.tar.gz: 7a2c09878c2fee9e0400365395a0e77367a75a7ce0c2084ebcadc401d55e9ee885906653bb1f3342a5fe826446b7477cfdf06f7eab95543423a02c1a1d076f8a
6
+ metadata.gz: 23b33609b6f49b293e520270599eaac63904a942eac35e1304dad9a170df47d99654d03cfe4383959e1b594e95eb9f10c913b5287a4494873725ff3adf151c03
7
+ data.tar.gz: 752422e4f9b3443e3830bfe31346d85165c8dd6b8ec26e48b3bf617114e3e23e21c8f3e5791c93b0813339368308be511497043df4bb3af2639f28af1a13efc6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Release history for google-apis-logging_v2
2
2
 
3
+ ### v0.24.0 (2022-02-19)
4
+
5
+ * Regenerated from discovery document revision 20220211
6
+
7
+ ### v0.23.0 (2022-02-12)
8
+
9
+ * Regenerated from discovery document revision 20220204
10
+
11
+ ### v0.22.0 (2022-02-05)
12
+
13
+ * Regenerated from discovery document revision 20220127
14
+
15
+ ### v0.21.0 (2022-01-15)
16
+
17
+ * Regenerated from discovery document revision 20211223
18
+ * Regenerated using generator version 0.4.1
19
+
3
20
  ### v0.20.0 (2021-12-14)
4
21
 
5
22
  * Unspecified changes
@@ -1136,9 +1136,9 @@ module Google
1136
1136
  # Information in the labels field identifies the actual resource and its
1137
1137
  # attributes according to the schema. For example, a particular Compute Engine
1138
1138
  # VM instance could be represented by the following object, because the
1139
- # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
1140
- # zone": ` "type": "gce_instance", "labels": ` "instance_id": "12345678901234", "
1141
- # zone": "us-central1-a" ``
1139
+ # MonitoredResourceDescriptor for "gce_instance" has labels "project_id", "
1140
+ # instance_id" and "zone": ` "type": "gce_instance", "labels": ` "project_id": "
1141
+ # my-project", "instance_id": "12345678901234", "zone": "us-central1-a" ``
1142
1142
  # Corresponds to the JSON property `resource`
1143
1143
  # @return [Google::Apis::LoggingV2::MonitoredResource]
1144
1144
  attr_accessor :resource
@@ -1162,6 +1162,13 @@ module Google
1162
1162
  # @return [String]
1163
1163
  attr_accessor :span_id
1164
1164
 
1165
+ # Additional information used to correlate multiple log entries. Used when a
1166
+ # single LogEntry would exceed the Google Cloud Logging size limit and is split
1167
+ # across multiple log entries.
1168
+ # Corresponds to the JSON property `split`
1169
+ # @return [Google::Apis::LoggingV2::LogSplit]
1170
+ attr_accessor :split
1171
+
1165
1172
  # The log entry payload, represented as a Unicode string (UTF-8).
1166
1173
  # Corresponds to the JSON property `textPayload`
1167
1174
  # @return [String]
@@ -1218,6 +1225,7 @@ module Google
1218
1225
  @severity = args[:severity] if args.key?(:severity)
1219
1226
  @source_location = args[:source_location] if args.key?(:source_location)
1220
1227
  @span_id = args[:span_id] if args.key?(:span_id)
1228
+ @split = args[:split] if args.key?(:split)
1221
1229
  @text_payload = args[:text_payload] if args.key?(:text_payload)
1222
1230
  @timestamp = args[:timestamp] if args.key?(:timestamp)
1223
1231
  @trace = args[:trace] if args.key?(:trace)
@@ -1486,11 +1494,11 @@ module Google
1486
1494
  # nginx/requests".Metric identifiers are limited to 100 characters and can
1487
1495
  # include only the following characters: A-Z, a-z, 0-9, and the special
1488
1496
  # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy
1489
- # of name pieces, and it cannot be the first character of the name.The metric
1490
- # identifier in this field must not be URL-encoded (https://en.wikipedia.org/
1491
- # wiki/Percent-encoding). However, when the metric identifier appears as the [
1492
- # METRIC_ID] part of a metric_name API parameter, then the metric identifier
1493
- # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
1497
+ # of name pieces, and it cannot be the first character of the name.This field is
1498
+ # the [METRIC_ID] part of a metric resource name in the format "projects/
1499
+ # PROJECT_ID/metrics/METRIC_ID". Example: If the resource name of a metric is "
1500
+ # projects/my-project/metrics/nginx%2Frequests", this field's value is "nginx/
1501
+ # requests".
1494
1502
  # Corresponds to the JSON property `name`
1495
1503
  # @return [String]
1496
1504
  attr_accessor :name
@@ -1675,6 +1683,42 @@ module Google
1675
1683
  end
1676
1684
  end
1677
1685
 
1686
+ # Additional information used to correlate multiple log entries. Used when a
1687
+ # single LogEntry would exceed the Google Cloud Logging size limit and is split
1688
+ # across multiple log entries.
1689
+ class LogSplit
1690
+ include Google::Apis::Core::Hashable
1691
+
1692
+ # The index of this LogEntry in the sequence of split log entries. Log entries
1693
+ # are given |index| values 0, 1, ..., n-1 for a sequence of n log entries.
1694
+ # Corresponds to the JSON property `index`
1695
+ # @return [Fixnum]
1696
+ attr_accessor :index
1697
+
1698
+ # The total number of log entries that the original LogEntry was split into.
1699
+ # Corresponds to the JSON property `totalSplits`
1700
+ # @return [Fixnum]
1701
+ attr_accessor :total_splits
1702
+
1703
+ # A globally unique identifier for all log entries in a sequence of split log
1704
+ # entries. All log entries with the same |LogSplit.uid| are assumed to be part
1705
+ # of the same sequence of split log entries.
1706
+ # Corresponds to the JSON property `uid`
1707
+ # @return [String]
1708
+ attr_accessor :uid
1709
+
1710
+ def initialize(**args)
1711
+ update!(**args)
1712
+ end
1713
+
1714
+ # Update properties of this object
1715
+ def update!(**args)
1716
+ @index = args[:index] if args.key?(:index)
1717
+ @total_splits = args[:total_splits] if args.key?(:total_splits)
1718
+ @uid = args[:uid] if args.key?(:uid)
1719
+ end
1720
+ end
1721
+
1678
1722
  # Describes a view over log entries in a bucket.
1679
1723
  class LogView
1680
1724
  include Google::Apis::Core::Hashable
@@ -1906,9 +1950,9 @@ module Google
1906
1950
  # Information in the labels field identifies the actual resource and its
1907
1951
  # attributes according to the schema. For example, a particular Compute Engine
1908
1952
  # VM instance could be represented by the following object, because the
1909
- # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
1910
- # zone": ` "type": "gce_instance", "labels": ` "instance_id": "12345678901234", "
1911
- # zone": "us-central1-a" ``
1953
+ # MonitoredResourceDescriptor for "gce_instance" has labels "project_id", "
1954
+ # instance_id" and "zone": ` "type": "gce_instance", "labels": ` "project_id": "
1955
+ # my-project", "instance_id": "12345678901234", "zone": "us-central1-a" ``
1912
1956
  class MonitoredResource
1913
1957
  include Google::Apis::Core::Hashable
1914
1958
 
@@ -1921,7 +1965,9 @@ module Google
1921
1965
 
1922
1966
  # Required. The monitored resource type. This field must match the type field of
1923
1967
  # a MonitoredResourceDescriptor object. For example, the type of a Compute
1924
- # Engine VM instance is gce_instance.
1968
+ # Engine VM instance is gce_instance. Some descriptors include the service name
1969
+ # in the type; for example, the type of a Datastream stream is datastream.
1970
+ # googleapis.com/Stream.
1925
1971
  # Corresponds to the JSON property `type`
1926
1972
  # @return [String]
1927
1973
  attr_accessor :type
@@ -2332,6 +2378,74 @@ module Google
2332
2378
  end
2333
2379
  end
2334
2380
 
2381
+ # Describes the settings associated with a project, folder, organization,
2382
+ # billing account, or flexible resource.
2383
+ class Settings
2384
+ include Google::Apis::Core::Hashable
2385
+
2386
+ # Optional. If set to true, the _Default sink in newly created projects and
2387
+ # folders will created in a disabled state. This can be used to automatically
2388
+ # disable log ingestion if there is already an aggregated sink configured in the
2389
+ # hierarchy. The _Default sink can be re-enabled manually if needed.
2390
+ # Corresponds to the JSON property `disableDefaultSink`
2391
+ # @return [Boolean]
2392
+ attr_accessor :disable_default_sink
2393
+ alias_method :disable_default_sink?, :disable_default_sink
2394
+
2395
+ # Optional. The resource name for the configured Cloud KMS key.KMS key name
2396
+ # format: "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/
2397
+ # cryptoKeys/[KEY]" For example:"projects/my-project/locations/us-central1/
2398
+ # keyRings/my-ring/cryptoKeys/my-key"To enable CMEK for the Log Router, set this
2399
+ # field to a valid kms_key_name for which the associated service account has the
2400
+ # required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key.
2401
+ # The Cloud KMS key used by the Log Router can be updated by changing the
2402
+ # kms_key_name to a new valid key name. Encryption operations that are in
2403
+ # progress will be completed with the key that was in use when they started.
2404
+ # Decryption operations will be completed using the key that was used at the
2405
+ # time of encryption unless access to that key has been revoked.To disable CMEK
2406
+ # for the Log Router, set this field to an empty string.See Enabling CMEK for
2407
+ # Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
2408
+ # for more information.
2409
+ # Corresponds to the JSON property `kmsKeyName`
2410
+ # @return [String]
2411
+ attr_accessor :kms_key_name
2412
+
2413
+ # Output only. The service account that will be used by the Log Router to access
2414
+ # your Cloud KMS key.Before enabling CMEK for Log Router, you must first assign
2415
+ # the role roles/cloudkms.cryptoKeyEncrypterDecrypter to the service account
2416
+ # that the Log Router will use to access your Cloud KMS key. Use GetSettings to
2417
+ # obtain the service account ID.See Enabling CMEK for Log Router (https://cloud.
2418
+ # google.com/logging/docs/routing/managed-encryption) for more information.
2419
+ # Corresponds to the JSON property `kmsServiceAccountId`
2420
+ # @return [String]
2421
+ attr_accessor :kms_service_account_id
2422
+
2423
+ # Output only. The resource name of the settings.
2424
+ # Corresponds to the JSON property `name`
2425
+ # @return [String]
2426
+ attr_accessor :name
2427
+
2428
+ # Optional. The Cloud region that will be used for _Default and _Required log
2429
+ # buckets for newly created projects and folders. For example europe-west1. This
2430
+ # setting does not affect the location of custom log buckets.
2431
+ # Corresponds to the JSON property `storageLocation`
2432
+ # @return [String]
2433
+ attr_accessor :storage_location
2434
+
2435
+ def initialize(**args)
2436
+ update!(**args)
2437
+ end
2438
+
2439
+ # Update properties of this object
2440
+ def update!(**args)
2441
+ @disable_default_sink = args[:disable_default_sink] if args.key?(:disable_default_sink)
2442
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
2443
+ @kms_service_account_id = args[:kms_service_account_id] if args.key?(:kms_service_account_id)
2444
+ @name = args[:name] if args.key?(:name)
2445
+ @storage_location = args[:storage_location] if args.key?(:storage_location)
2446
+ end
2447
+ end
2448
+
2335
2449
  # Specifies a location in a source code file.
2336
2450
  class SourceLocation
2337
2451
  include Google::Apis::Core::Hashable
@@ -2619,9 +2733,9 @@ module Google
2619
2733
  # Information in the labels field identifies the actual resource and its
2620
2734
  # attributes according to the schema. For example, a particular Compute Engine
2621
2735
  # VM instance could be represented by the following object, because the
2622
- # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
2623
- # zone": ` "type": "gce_instance", "labels": ` "instance_id": "12345678901234", "
2624
- # zone": "us-central1-a" ``
2736
+ # MonitoredResourceDescriptor for "gce_instance" has labels "project_id", "
2737
+ # instance_id" and "zone": ` "type": "gce_instance", "labels": ` "project_id": "
2738
+ # my-project", "instance_id": "12345678901234", "zone": "us-central1-a" ``
2625
2739
  # Corresponds to the JSON property `resource`
2626
2740
  # @return [Google::Apis::LoggingV2::MonitoredResource]
2627
2741
  attr_accessor :resource
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module LoggingV2
18
18
  # Version of the google-apis-logging_v2 gem
19
- GEM_VERSION = "0.20.0"
19
+ GEM_VERSION = "0.24.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.4.0"
22
+ GENERATOR_VERSION = "0.4.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20211130"
25
+ REVISION = "20220211"
26
26
  end
27
27
  end
28
28
  end
@@ -220,6 +220,12 @@ module Google
220
220
  include Google::Apis::Core::JsonObjectSupport
221
221
  end
222
222
 
223
+ class LogSplit
224
+ class Representation < Google::Apis::Core::JsonRepresentation; end
225
+
226
+ include Google::Apis::Core::JsonObjectSupport
227
+ end
228
+
223
229
  class LogView
224
230
  class Representation < Google::Apis::Core::JsonRepresentation; end
225
231
 
@@ -268,6 +274,12 @@ module Google
268
274
  include Google::Apis::Core::JsonObjectSupport
269
275
  end
270
276
 
277
+ class Settings
278
+ class Representation < Google::Apis::Core::JsonRepresentation; end
279
+
280
+ include Google::Apis::Core::JsonObjectSupport
281
+ end
282
+
271
283
  class SourceLocation
272
284
  class Representation < Google::Apis::Core::JsonRepresentation; end
273
285
 
@@ -597,6 +609,8 @@ module Google
597
609
  property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2::LogEntrySourceLocation::Representation
598
610
 
599
611
  property :span_id, as: 'spanId'
612
+ property :split, as: 'split', class: Google::Apis::LoggingV2::LogSplit, decorator: Google::Apis::LoggingV2::LogSplit::Representation
613
+
600
614
  property :text_payload, as: 'textPayload'
601
615
  property :timestamp, as: 'timestamp'
602
616
  property :trace, as: 'trace'
@@ -685,6 +699,15 @@ module Google
685
699
  end
686
700
  end
687
701
 
702
+ class LogSplit
703
+ # @private
704
+ class Representation < Google::Apis::Core::JsonRepresentation
705
+ property :index, as: 'index'
706
+ property :total_splits, as: 'totalSplits'
707
+ property :uid, as: 'uid'
708
+ end
709
+ end
710
+
688
711
  class LogView
689
712
  # @private
690
713
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -806,6 +829,17 @@ module Google
806
829
  end
807
830
  end
808
831
 
832
+ class Settings
833
+ # @private
834
+ class Representation < Google::Apis::Core::JsonRepresentation
835
+ property :disable_default_sink, as: 'disableDefaultSink'
836
+ property :kms_key_name, as: 'kmsKeyName'
837
+ property :kms_service_account_id, as: 'kmsServiceAccountId'
838
+ property :name, as: 'name'
839
+ property :storage_location, as: 'storageLocation'
840
+ end
841
+ end
842
+
809
843
  class SourceLocation
810
844
  # @private
811
845
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -90,6 +90,48 @@ module Google
90
90
  execute_or_queue_command(command, &block)
91
91
  end
92
92
 
93
+ # Gets the Log Router settings for the given resource.Note: Settings for the Log
94
+ # Router can be get for Google Cloud projects, folders, organizations and
95
+ # billing accounts. Currently it can only be configured for organizations. Once
96
+ # configured for an organization, it applies to all projects and folders in the
97
+ # Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.
98
+ # google.com/logging/docs/routing/managed-encryption) for more information.
99
+ # @param [String] name
100
+ # Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/
101
+ # settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[
102
+ # BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"
103
+ # organizations/12345/settings"Note: Settings for the Log Router can be get for
104
+ # Google Cloud projects, folders, organizations and billing accounts. Currently
105
+ # it can only be configured for organizations. Once configured for an
106
+ # organization, it applies to all projects and folders in the Google Cloud
107
+ # organization.
108
+ # @param [String] fields
109
+ # Selector specifying which fields to include in a partial response.
110
+ # @param [String] quota_user
111
+ # Available to use for quota purposes for server-side applications. Can be any
112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
113
+ # @param [Google::Apis::RequestOptions] options
114
+ # Request-specific options
115
+ #
116
+ # @yield [result, err] Result & error if block supplied
117
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
118
+ # @yieldparam err [StandardError] error object if request failed
119
+ #
120
+ # @return [Google::Apis::LoggingV2::Settings]
121
+ #
122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
125
+ def get_billing_account_settings(name, fields: nil, quota_user: nil, options: nil, &block)
126
+ command = make_simple_command(:get, 'v2/{+name}/settings', options)
127
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
128
+ command.response_class = Google::Apis::LoggingV2::Settings
129
+ command.params['name'] = name unless name.nil?
130
+ command.query['fields'] = fields unless fields.nil?
131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
132
+ execute_or_queue_command(command, &block)
133
+ end
134
+
93
135
  # Gets a log bucket.
94
136
  # @param [String] name
95
137
  # Required. The resource name of the bucket: "projects/[PROJECT_ID]/locations/[
@@ -1650,6 +1692,99 @@ module Google
1650
1692
  execute_or_queue_command(command, &block)
1651
1693
  end
1652
1694
 
1695
+ # Gets the Log Router settings for the given resource.Note: Settings for the Log
1696
+ # Router can be get for Google Cloud projects, folders, organizations and
1697
+ # billing accounts. Currently it can only be configured for organizations. Once
1698
+ # configured for an organization, it applies to all projects and folders in the
1699
+ # Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.
1700
+ # google.com/logging/docs/routing/managed-encryption) for more information.
1701
+ # @param [String] name
1702
+ # Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/
1703
+ # settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[
1704
+ # BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"
1705
+ # organizations/12345/settings"Note: Settings for the Log Router can be get for
1706
+ # Google Cloud projects, folders, organizations and billing accounts. Currently
1707
+ # it can only be configured for organizations. Once configured for an
1708
+ # organization, it applies to all projects and folders in the Google Cloud
1709
+ # organization.
1710
+ # @param [String] fields
1711
+ # Selector specifying which fields to include in a partial response.
1712
+ # @param [String] quota_user
1713
+ # Available to use for quota purposes for server-side applications. Can be any
1714
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1715
+ # @param [Google::Apis::RequestOptions] options
1716
+ # Request-specific options
1717
+ #
1718
+ # @yield [result, err] Result & error if block supplied
1719
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
1720
+ # @yieldparam err [StandardError] error object if request failed
1721
+ #
1722
+ # @return [Google::Apis::LoggingV2::Settings]
1723
+ #
1724
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1725
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1726
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1727
+ def get_folder_settings(name, fields: nil, quota_user: nil, options: nil, &block)
1728
+ command = make_simple_command(:get, 'v2/{+name}/settings', options)
1729
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
1730
+ command.response_class = Google::Apis::LoggingV2::Settings
1731
+ command.params['name'] = name unless name.nil?
1732
+ command.query['fields'] = fields unless fields.nil?
1733
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1734
+ execute_or_queue_command(command, &block)
1735
+ end
1736
+
1737
+ # Updates the Log Router settings for the given resource.Note: Settings for the
1738
+ # Log Router can currently only be configured for Google Cloud organizations.
1739
+ # Once configured, it applies to all projects and folders in the Google Cloud
1740
+ # organization.UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the
1741
+ # associated service account does not have the required roles/cloudkms.
1742
+ # cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key
1743
+ # is disabled. 4) location_id is not supported by Logging. 5) location_id
1744
+ # violate OrgPolicy.See Enabling CMEK for Log Router (https://cloud.google.com/
1745
+ # logging/docs/routing/managed-encryption) for more information.
1746
+ # @param [String] name
1747
+ # Required. The resource name for the settings to update. "organizations/[
1748
+ # ORGANIZATION_ID]/settings" For example:"organizations/12345/settings"Note:
1749
+ # Settings for the Log Router can currently only be configured for Google Cloud
1750
+ # organizations. Once configured, it applies to all projects and folders in the
1751
+ # Google Cloud organization.
1752
+ # @param [Google::Apis::LoggingV2::Settings] settings_object
1753
+ # @param [String] update_mask
1754
+ # Optional. Field mask identifying which fields from settings should be updated.
1755
+ # A field will be overwritten if and only if it is in the update mask. Output
1756
+ # only fields cannot be updated.See FieldMask for more information.For example: "
1757
+ # updateMask=kmsKeyName"
1758
+ # @param [String] fields
1759
+ # Selector specifying which fields to include in a partial response.
1760
+ # @param [String] quota_user
1761
+ # Available to use for quota purposes for server-side applications. Can be any
1762
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1763
+ # @param [Google::Apis::RequestOptions] options
1764
+ # Request-specific options
1765
+ #
1766
+ # @yield [result, err] Result & error if block supplied
1767
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
1768
+ # @yieldparam err [StandardError] error object if request failed
1769
+ #
1770
+ # @return [Google::Apis::LoggingV2::Settings]
1771
+ #
1772
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1773
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1774
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1775
+ def update_folder_settings(name, settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1776
+ command = make_simple_command(:patch, 'v2/{+name}/settings', options)
1777
+ command.request_representation = Google::Apis::LoggingV2::Settings::Representation
1778
+ command.request_object = settings_object
1779
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
1780
+ command.response_class = Google::Apis::LoggingV2::Settings
1781
+ command.params['name'] = name unless name.nil?
1782
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1783
+ command.query['fields'] = fields unless fields.nil?
1784
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1785
+ execute_or_queue_command(command, &block)
1786
+ end
1787
+
1653
1788
  # Creates a new exclusion in the _Default sink in a specified parent resource.
1654
1789
  # Only log entries belonging to that resource can be excluded. You can have up
1655
1790
  # to 10 exclusions in a resource.
@@ -3650,6 +3785,48 @@ module Google
3650
3785
  execute_or_queue_command(command, &block)
3651
3786
  end
3652
3787
 
3788
+ # Gets the Log Router settings for the given resource.Note: Settings for the Log
3789
+ # Router can be get for Google Cloud projects, folders, organizations and
3790
+ # billing accounts. Currently it can only be configured for organizations. Once
3791
+ # configured for an organization, it applies to all projects and folders in the
3792
+ # Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.
3793
+ # google.com/logging/docs/routing/managed-encryption) for more information.
3794
+ # @param [String] name
3795
+ # Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/
3796
+ # settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[
3797
+ # BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"
3798
+ # organizations/12345/settings"Note: Settings for the Log Router can be get for
3799
+ # Google Cloud projects, folders, organizations and billing accounts. Currently
3800
+ # it can only be configured for organizations. Once configured for an
3801
+ # organization, it applies to all projects and folders in the Google Cloud
3802
+ # organization.
3803
+ # @param [String] fields
3804
+ # Selector specifying which fields to include in a partial response.
3805
+ # @param [String] quota_user
3806
+ # Available to use for quota purposes for server-side applications. Can be any
3807
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3808
+ # @param [Google::Apis::RequestOptions] options
3809
+ # Request-specific options
3810
+ #
3811
+ # @yield [result, err] Result & error if block supplied
3812
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
3813
+ # @yieldparam err [StandardError] error object if request failed
3814
+ #
3815
+ # @return [Google::Apis::LoggingV2::Settings]
3816
+ #
3817
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3818
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3819
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3820
+ def get_organization_settings(name, fields: nil, quota_user: nil, options: nil, &block)
3821
+ command = make_simple_command(:get, 'v2/{+name}/settings', options)
3822
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
3823
+ command.response_class = Google::Apis::LoggingV2::Settings
3824
+ command.params['name'] = name unless name.nil?
3825
+ command.query['fields'] = fields unless fields.nil?
3826
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3827
+ execute_or_queue_command(command, &block)
3828
+ end
3829
+
3653
3830
  # Updates the Log Router CMEK settings for the given resource.Note: CMEK for the
3654
3831
  # Log Router can currently only be configured for Google Cloud organizations.
3655
3832
  # Once configured, it applies to all projects and folders in the Google Cloud
@@ -3702,6 +3879,57 @@ module Google
3702
3879
  execute_or_queue_command(command, &block)
3703
3880
  end
3704
3881
 
3882
+ # Updates the Log Router settings for the given resource.Note: Settings for the
3883
+ # Log Router can currently only be configured for Google Cloud organizations.
3884
+ # Once configured, it applies to all projects and folders in the Google Cloud
3885
+ # organization.UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the
3886
+ # associated service account does not have the required roles/cloudkms.
3887
+ # cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key
3888
+ # is disabled. 4) location_id is not supported by Logging. 5) location_id
3889
+ # violate OrgPolicy.See Enabling CMEK for Log Router (https://cloud.google.com/
3890
+ # logging/docs/routing/managed-encryption) for more information.
3891
+ # @param [String] name
3892
+ # Required. The resource name for the settings to update. "organizations/[
3893
+ # ORGANIZATION_ID]/settings" For example:"organizations/12345/settings"Note:
3894
+ # Settings for the Log Router can currently only be configured for Google Cloud
3895
+ # organizations. Once configured, it applies to all projects and folders in the
3896
+ # Google Cloud organization.
3897
+ # @param [Google::Apis::LoggingV2::Settings] settings_object
3898
+ # @param [String] update_mask
3899
+ # Optional. Field mask identifying which fields from settings should be updated.
3900
+ # A field will be overwritten if and only if it is in the update mask. Output
3901
+ # only fields cannot be updated.See FieldMask for more information.For example: "
3902
+ # updateMask=kmsKeyName"
3903
+ # @param [String] fields
3904
+ # Selector specifying which fields to include in a partial response.
3905
+ # @param [String] quota_user
3906
+ # Available to use for quota purposes for server-side applications. Can be any
3907
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3908
+ # @param [Google::Apis::RequestOptions] options
3909
+ # Request-specific options
3910
+ #
3911
+ # @yield [result, err] Result & error if block supplied
3912
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
3913
+ # @yieldparam err [StandardError] error object if request failed
3914
+ #
3915
+ # @return [Google::Apis::LoggingV2::Settings]
3916
+ #
3917
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3918
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3919
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3920
+ def update_organization_settings(name, settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
3921
+ command = make_simple_command(:patch, 'v2/{+name}/settings', options)
3922
+ command.request_representation = Google::Apis::LoggingV2::Settings::Representation
3923
+ command.request_object = settings_object
3924
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
3925
+ command.response_class = Google::Apis::LoggingV2::Settings
3926
+ command.params['name'] = name unless name.nil?
3927
+ command.query['updateMask'] = update_mask unless update_mask.nil?
3928
+ command.query['fields'] = fields unless fields.nil?
3929
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3930
+ execute_or_queue_command(command, &block)
3931
+ end
3932
+
3705
3933
  # Creates a new exclusion in the _Default sink in a specified parent resource.
3706
3934
  # Only log entries belonging to that resource can be excluded. You can have up
3707
3935
  # to 10 exclusions in a resource.
@@ -4941,6 +5169,48 @@ module Google
4941
5169
  execute_or_queue_command(command, &block)
4942
5170
  end
4943
5171
 
5172
+ # Gets the Log Router settings for the given resource.Note: Settings for the Log
5173
+ # Router can be get for Google Cloud projects, folders, organizations and
5174
+ # billing accounts. Currently it can only be configured for organizations. Once
5175
+ # configured for an organization, it applies to all projects and folders in the
5176
+ # Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.
5177
+ # google.com/logging/docs/routing/managed-encryption) for more information.
5178
+ # @param [String] name
5179
+ # Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/
5180
+ # settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[
5181
+ # BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"
5182
+ # organizations/12345/settings"Note: Settings for the Log Router can be get for
5183
+ # Google Cloud projects, folders, organizations and billing accounts. Currently
5184
+ # it can only be configured for organizations. Once configured for an
5185
+ # organization, it applies to all projects and folders in the Google Cloud
5186
+ # organization.
5187
+ # @param [String] fields
5188
+ # Selector specifying which fields to include in a partial response.
5189
+ # @param [String] quota_user
5190
+ # Available to use for quota purposes for server-side applications. Can be any
5191
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
5192
+ # @param [Google::Apis::RequestOptions] options
5193
+ # Request-specific options
5194
+ #
5195
+ # @yield [result, err] Result & error if block supplied
5196
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
5197
+ # @yieldparam err [StandardError] error object if request failed
5198
+ #
5199
+ # @return [Google::Apis::LoggingV2::Settings]
5200
+ #
5201
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5202
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5203
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
5204
+ def get_project_settings(name, fields: nil, quota_user: nil, options: nil, &block)
5205
+ command = make_simple_command(:get, 'v2/{+name}/settings', options)
5206
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
5207
+ command.response_class = Google::Apis::LoggingV2::Settings
5208
+ command.params['name'] = name unless name.nil?
5209
+ command.query['fields'] = fields unless fields.nil?
5210
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
5211
+ execute_or_queue_command(command, &block)
5212
+ end
5213
+
4944
5214
  # Creates a new exclusion in the _Default sink in a specified parent resource.
4945
5215
  # Only log entries belonging to that resource can be excluded. You can have up
4946
5216
  # to 10 exclusions in a resource.
@@ -6575,6 +6845,48 @@ module Google
6575
6845
  execute_or_queue_command(command, &block)
6576
6846
  end
6577
6847
 
6848
+ # Gets the Log Router settings for the given resource.Note: Settings for the Log
6849
+ # Router can be get for Google Cloud projects, folders, organizations and
6850
+ # billing accounts. Currently it can only be configured for organizations. Once
6851
+ # configured for an organization, it applies to all projects and folders in the
6852
+ # Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.
6853
+ # google.com/logging/docs/routing/managed-encryption) for more information.
6854
+ # @param [String] name
6855
+ # Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/
6856
+ # settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[
6857
+ # BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"
6858
+ # organizations/12345/settings"Note: Settings for the Log Router can be get for
6859
+ # Google Cloud projects, folders, organizations and billing accounts. Currently
6860
+ # it can only be configured for organizations. Once configured for an
6861
+ # organization, it applies to all projects and folders in the Google Cloud
6862
+ # organization.
6863
+ # @param [String] fields
6864
+ # Selector specifying which fields to include in a partial response.
6865
+ # @param [String] quota_user
6866
+ # Available to use for quota purposes for server-side applications. Can be any
6867
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
6868
+ # @param [Google::Apis::RequestOptions] options
6869
+ # Request-specific options
6870
+ #
6871
+ # @yield [result, err] Result & error if block supplied
6872
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
6873
+ # @yieldparam err [StandardError] error object if request failed
6874
+ #
6875
+ # @return [Google::Apis::LoggingV2::Settings]
6876
+ #
6877
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
6878
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
6879
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
6880
+ def get_settings(name, fields: nil, quota_user: nil, options: nil, &block)
6881
+ command = make_simple_command(:get, 'v2/{+name}/settings', options)
6882
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
6883
+ command.response_class = Google::Apis::LoggingV2::Settings
6884
+ command.params['name'] = name unless name.nil?
6885
+ command.query['fields'] = fields unless fields.nil?
6886
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
6887
+ execute_or_queue_command(command, &block)
6888
+ end
6889
+
6578
6890
  # Updates the Log Router CMEK settings for the given resource.Note: CMEK for the
6579
6891
  # Log Router can currently only be configured for Google Cloud organizations.
6580
6892
  # Once configured, it applies to all projects and folders in the Google Cloud
@@ -6626,6 +6938,57 @@ module Google
6626
6938
  command.query['quotaUser'] = quota_user unless quota_user.nil?
6627
6939
  execute_or_queue_command(command, &block)
6628
6940
  end
6941
+
6942
+ # Updates the Log Router settings for the given resource.Note: Settings for the
6943
+ # Log Router can currently only be configured for Google Cloud organizations.
6944
+ # Once configured, it applies to all projects and folders in the Google Cloud
6945
+ # organization.UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the
6946
+ # associated service account does not have the required roles/cloudkms.
6947
+ # cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key
6948
+ # is disabled. 4) location_id is not supported by Logging. 5) location_id
6949
+ # violate OrgPolicy.See Enabling CMEK for Log Router (https://cloud.google.com/
6950
+ # logging/docs/routing/managed-encryption) for more information.
6951
+ # @param [String] name
6952
+ # Required. The resource name for the settings to update. "organizations/[
6953
+ # ORGANIZATION_ID]/settings" For example:"organizations/12345/settings"Note:
6954
+ # Settings for the Log Router can currently only be configured for Google Cloud
6955
+ # organizations. Once configured, it applies to all projects and folders in the
6956
+ # Google Cloud organization.
6957
+ # @param [Google::Apis::LoggingV2::Settings] settings_object
6958
+ # @param [String] update_mask
6959
+ # Optional. Field mask identifying which fields from settings should be updated.
6960
+ # A field will be overwritten if and only if it is in the update mask. Output
6961
+ # only fields cannot be updated.See FieldMask for more information.For example: "
6962
+ # updateMask=kmsKeyName"
6963
+ # @param [String] fields
6964
+ # Selector specifying which fields to include in a partial response.
6965
+ # @param [String] quota_user
6966
+ # Available to use for quota purposes for server-side applications. Can be any
6967
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
6968
+ # @param [Google::Apis::RequestOptions] options
6969
+ # Request-specific options
6970
+ #
6971
+ # @yield [result, err] Result & error if block supplied
6972
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
6973
+ # @yieldparam err [StandardError] error object if request failed
6974
+ #
6975
+ # @return [Google::Apis::LoggingV2::Settings]
6976
+ #
6977
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
6978
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
6979
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
6980
+ def update_settings(name, settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
6981
+ command = make_simple_command(:patch, 'v2/{+name}/settings', options)
6982
+ command.request_representation = Google::Apis::LoggingV2::Settings::Representation
6983
+ command.request_object = settings_object
6984
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
6985
+ command.response_class = Google::Apis::LoggingV2::Settings
6986
+ command.params['name'] = name unless name.nil?
6987
+ command.query['updateMask'] = update_mask unless update_mask.nil?
6988
+ command.query['fields'] = fields unless fields.nil?
6989
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
6990
+ execute_or_queue_command(command, &block)
6991
+ end
6629
6992
 
6630
6993
  protected
6631
6994
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-logging_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.24.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-01-10 00:00:00.000000000 Z
11
+ date: 2022-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -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-logging_v2/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-logging_v2/v0.20.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-logging_v2/v0.24.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-logging_v2
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.3.4
78
+ rubygems_version: 3.3.5
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Cloud Logging API V2