google-apis-logging_v2 0.18.0 → 0.22.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: 9a366e5cf9298df4b8fc7e3860e21dc80e1d9e2db2b02612d5f5dcdbbd97edfe
4
- data.tar.gz: 85cbaad452a63295a01785179e36c6c1b4042888262df1e662a8028c977aa57f
3
+ metadata.gz: 8102895df8b91df8daf114abcc9de7012dba52ffe89b1a79730ced8b41e0ba7f
4
+ data.tar.gz: cf9b601835d5e0ef2141b2f4fe628bb592e438cda93d3a6a3f4571c8b4263cff
5
5
  SHA512:
6
- metadata.gz: 176992bac9bcfddeb5f638a2245a46cd085e051af5a55374c21bdc1ffa1f5e0a73a261f1a9c93955bc45f4e7f7bc5170c721dde5848aab9da0af5c3d9bec7fb0
7
- data.tar.gz: 3b86aeacbab0bdf1dd2a3c1b4c86a712363e7a795b0db5e2555c09a2d4880544ec46a45cbeb169afbfa8a0862f30617113200d83df04f533da7446c909bbfe42
6
+ metadata.gz: 128fe6e7f8a74c783372026fe88d376986f55edd68b054bef4b975a9a06661477620f1069918c82cbb970c01e0e8453cb7403255cae619a7699e9ee98da26211
7
+ data.tar.gz: 9439d8a7e0fe2a09116ecafa29db7f1b417eeb18e75a907001aaa3ef32fa4d5e6eea042ce7cecf89d3f2d1251ab67e7020eb92411d0cc818194a5e11218b5f50
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Release history for google-apis-logging_v2
2
2
 
3
+ ### v0.22.0 (2022-02-05)
4
+
5
+ * Regenerated from discovery document revision 20220127
6
+
7
+ ### v0.21.0 (2022-01-15)
8
+
9
+ * Regenerated from discovery document revision 20211223
10
+ * Regenerated using generator version 0.4.1
11
+
12
+ ### v0.20.0 (2021-12-14)
13
+
14
+ * Unspecified changes
15
+
16
+ ### v0.19.0 (2021-12-11)
17
+
18
+ * Regenerated from discovery document revision 20211130
19
+
3
20
  ### v0.18.0 (2021-11-19)
4
21
 
5
22
  * Regenerated from discovery document revision 20211108
data/OVERVIEW.md CHANGED
@@ -51,7 +51,7 @@ require "google/apis/logging_v2"
51
51
  client = Google::Apis::LoggingV2::LoggingService.new
52
52
 
53
53
  # Authenticate calls
54
- client.authentication = # ... use the googleauth gem to create credentials
54
+ client.authorization = # ... use the googleauth gem to create credentials
55
55
  ```
56
56
 
57
57
  See the class reference docs for information on the methods you can call from a client.
@@ -165,7 +165,7 @@ module Google
165
165
  # your Cloud KMS key.Before enabling CMEK for Log Router, you must first assign
166
166
  # the cloudkms.cryptoKeyEncrypterDecrypter role to the service account that the
167
167
  # Log Router will use to access your Cloud KMS key. Use GetCmekSettings to
168
- # obtain the service account ID.See Enabling CMEK for Logs Router (https://cloud.
168
+ # obtain the service account ID.See Enabling CMEK for Log Router (https://cloud.
169
169
  # google.com/logging/docs/routing/managed-encryption) for more information.
170
170
  # Corresponds to the JSON property `serviceAccountId`
171
171
  # @return [String]
@@ -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
@@ -1486,11 +1486,11 @@ module Google
1486
1486
  # nginx/requests".Metric identifiers are limited to 100 characters and can
1487
1487
  # include only the following characters: A-Z, a-z, 0-9, and the special
1488
1488
  # 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".
1489
+ # of name pieces, and it cannot be the first character of the name.This field is
1490
+ # the [METRIC_ID] part of a metric resource name in the format "projects/
1491
+ # PROJECT_ID/metrics/METRIC_ID". Example: If the resource name of a metric is "
1492
+ # projects/my-project/metrics/nginx%2Frequests", this field's value is "nginx/
1493
+ # requests".
1494
1494
  # Corresponds to the JSON property `name`
1495
1495
  # @return [String]
1496
1496
  attr_accessor :name
@@ -1906,9 +1906,9 @@ module Google
1906
1906
  # Information in the labels field identifies the actual resource and its
1907
1907
  # attributes according to the schema. For example, a particular Compute Engine
1908
1908
  # 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" ``
1909
+ # MonitoredResourceDescriptor for "gce_instance" has labels "project_id", "
1910
+ # instance_id" and "zone": ` "type": "gce_instance", "labels": ` "project_id": "
1911
+ # my-project", "instance_id": "12345678901234", "zone": "us-central1-a" ``
1912
1912
  class MonitoredResource
1913
1913
  include Google::Apis::Core::Hashable
1914
1914
 
@@ -1921,7 +1921,9 @@ module Google
1921
1921
 
1922
1922
  # Required. The monitored resource type. This field must match the type field of
1923
1923
  # a MonitoredResourceDescriptor object. For example, the type of a Compute
1924
- # Engine VM instance is gce_instance.
1924
+ # Engine VM instance is gce_instance. Some descriptors include the service name
1925
+ # in the type; for example, the type of a Datastream stream is datastream.
1926
+ # googleapis.com/Stream.
1925
1927
  # Corresponds to the JSON property `type`
1926
1928
  # @return [String]
1927
1929
  attr_accessor :type
@@ -2332,6 +2334,44 @@ module Google
2332
2334
  end
2333
2335
  end
2334
2336
 
2337
+ # Describes the settings associated with a project, folder, organization,
2338
+ # billing account, or flexible resource.
2339
+ class Settings
2340
+ include Google::Apis::Core::Hashable
2341
+
2342
+ # Optional. If set to true, the _Default sink in newly created projects and
2343
+ # folders will created in a disabled state. This can be used to automatically
2344
+ # disable log ingestion if there is already an aggregated sink configured in the
2345
+ # hierarchy. The _Default sink can be re-enabled manually if needed.
2346
+ # Corresponds to the JSON property `disableDefaultSink`
2347
+ # @return [Boolean]
2348
+ attr_accessor :disable_default_sink
2349
+ alias_method :disable_default_sink?, :disable_default_sink
2350
+
2351
+ # Output only. The resource name of the settings.
2352
+ # Corresponds to the JSON property `name`
2353
+ # @return [String]
2354
+ attr_accessor :name
2355
+
2356
+ # Optional. The Cloud region that will be used for _Default and _Required log
2357
+ # buckets for newly created projects and folders. For example europe-west1. This
2358
+ # setting does not affect the location of custom log buckets.
2359
+ # Corresponds to the JSON property `storageLocation`
2360
+ # @return [String]
2361
+ attr_accessor :storage_location
2362
+
2363
+ def initialize(**args)
2364
+ update!(**args)
2365
+ end
2366
+
2367
+ # Update properties of this object
2368
+ def update!(**args)
2369
+ @disable_default_sink = args[:disable_default_sink] if args.key?(:disable_default_sink)
2370
+ @name = args[:name] if args.key?(:name)
2371
+ @storage_location = args[:storage_location] if args.key?(:storage_location)
2372
+ end
2373
+ end
2374
+
2335
2375
  # Specifies a location in a source code file.
2336
2376
  class SourceLocation
2337
2377
  include Google::Apis::Core::Hashable
@@ -2619,9 +2659,9 @@ module Google
2619
2659
  # Information in the labels field identifies the actual resource and its
2620
2660
  # attributes according to the schema. For example, a particular Compute Engine
2621
2661
  # 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" ``
2662
+ # MonitoredResourceDescriptor for "gce_instance" has labels "project_id", "
2663
+ # instance_id" and "zone": ` "type": "gce_instance", "labels": ` "project_id": "
2664
+ # my-project", "instance_id": "12345678901234", "zone": "us-central1-a" ``
2625
2665
  # Corresponds to the JSON property `resource`
2626
2666
  # @return [Google::Apis::LoggingV2::MonitoredResource]
2627
2667
  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.18.0"
19
+ GEM_VERSION = "0.22.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 = "20211108"
25
+ REVISION = "20220127"
26
26
  end
27
27
  end
28
28
  end
@@ -268,6 +268,12 @@ module Google
268
268
  include Google::Apis::Core::JsonObjectSupport
269
269
  end
270
270
 
271
+ class Settings
272
+ class Representation < Google::Apis::Core::JsonRepresentation; end
273
+
274
+ include Google::Apis::Core::JsonObjectSupport
275
+ end
276
+
271
277
  class SourceLocation
272
278
  class Representation < Google::Apis::Core::JsonRepresentation; end
273
279
 
@@ -806,6 +812,15 @@ module Google
806
812
  end
807
813
  end
808
814
 
815
+ class Settings
816
+ # @private
817
+ class Representation < Google::Apis::Core::JsonRepresentation
818
+ property :disable_default_sink, as: 'disableDefaultSink'
819
+ property :name, as: 'name'
820
+ property :storage_location, as: 'storageLocation'
821
+ end
822
+ end
823
+
809
824
  class SourceLocation
810
825
  # @private
811
826
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -53,7 +53,7 @@ module Google
53
53
  # Router can be configured for Google Cloud projects, folders, organizations and
54
54
  # billing accounts. Once configured for an organization, it applies to all
55
55
  # projects and folders in the Google Cloud organization.See Enabling CMEK for
56
- # Logs Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
56
+ # Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
57
57
  # for more information.
58
58
  # @param [String] name
59
59
  # Required. The resource for which to retrieve CMEK settings. "projects/[
@@ -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/[
@@ -1613,7 +1655,7 @@ module Google
1613
1655
  # Router can be configured for Google Cloud projects, folders, organizations and
1614
1656
  # billing accounts. Once configured for an organization, it applies to all
1615
1657
  # projects and folders in the Google Cloud organization.See Enabling CMEK for
1616
- # Logs Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
1658
+ # Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
1617
1659
  # for more information.
1618
1660
  # @param [String] name
1619
1661
  # Required. The resource for which to retrieve CMEK settings. "projects/[
@@ -1650,6 +1692,48 @@ 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
+
1653
1737
  # Creates a new exclusion in the _Default sink in a specified parent resource.
1654
1738
  # Only log entries belonging to that resource can be excluded. You can have up
1655
1739
  # to 10 exclusions in a resource.
@@ -3613,7 +3697,7 @@ module Google
3613
3697
  # Router can be configured for Google Cloud projects, folders, organizations and
3614
3698
  # billing accounts. Once configured for an organization, it applies to all
3615
3699
  # projects and folders in the Google Cloud organization.See Enabling CMEK for
3616
- # Logs Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
3700
+ # Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
3617
3701
  # for more information.
3618
3702
  # @param [String] name
3619
3703
  # Required. The resource for which to retrieve CMEK settings. "projects/[
@@ -3650,6 +3734,48 @@ module Google
3650
3734
  execute_or_queue_command(command, &block)
3651
3735
  end
3652
3736
 
3737
+ # Gets the Log Router settings for the given resource.Note: Settings for the Log
3738
+ # Router can be get for Google Cloud projects, folders, organizations and
3739
+ # billing accounts. Currently it can only be configured for organizations. Once
3740
+ # configured for an organization, it applies to all projects and folders in the
3741
+ # Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.
3742
+ # google.com/logging/docs/routing/managed-encryption) for more information.
3743
+ # @param [String] name
3744
+ # Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/
3745
+ # settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[
3746
+ # BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"
3747
+ # organizations/12345/settings"Note: Settings for the Log Router can be get for
3748
+ # Google Cloud projects, folders, organizations and billing accounts. Currently
3749
+ # it can only be configured for organizations. Once configured for an
3750
+ # organization, it applies to all projects and folders in the Google Cloud
3751
+ # organization.
3752
+ # @param [String] fields
3753
+ # Selector specifying which fields to include in a partial response.
3754
+ # @param [String] quota_user
3755
+ # Available to use for quota purposes for server-side applications. Can be any
3756
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3757
+ # @param [Google::Apis::RequestOptions] options
3758
+ # Request-specific options
3759
+ #
3760
+ # @yield [result, err] Result & error if block supplied
3761
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
3762
+ # @yieldparam err [StandardError] error object if request failed
3763
+ #
3764
+ # @return [Google::Apis::LoggingV2::Settings]
3765
+ #
3766
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3767
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3768
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3769
+ def get_organization_settings(name, fields: nil, quota_user: nil, options: nil, &block)
3770
+ command = make_simple_command(:get, 'v2/{+name}/settings', options)
3771
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
3772
+ command.response_class = Google::Apis::LoggingV2::Settings
3773
+ command.params['name'] = name unless name.nil?
3774
+ command.query['fields'] = fields unless fields.nil?
3775
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3776
+ execute_or_queue_command(command, &block)
3777
+ end
3778
+
3653
3779
  # Updates the Log Router CMEK settings for the given resource.Note: CMEK for the
3654
3780
  # Log Router can currently only be configured for Google Cloud organizations.
3655
3781
  # Once configured, it applies to all projects and folders in the Google Cloud
@@ -3702,6 +3828,57 @@ module Google
3702
3828
  execute_or_queue_command(command, &block)
3703
3829
  end
3704
3830
 
3831
+ # Updates the Log Router settings for the given resource.Note: Settings for the
3832
+ # Log Router can currently only be configured for Google Cloud organizations.
3833
+ # Once configured, it applies to all projects and folders in the Google Cloud
3834
+ # organization.UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the
3835
+ # associated service account does not have the required roles/cloudkms.
3836
+ # cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key
3837
+ # is disabled. 4) location_id is not supported by Logging. 5) location_id
3838
+ # violate OrgPolicy.See Enabling CMEK for Log Router (https://cloud.google.com/
3839
+ # logging/docs/routing/managed-encryption) for more information.
3840
+ # @param [String] name
3841
+ # Required. The resource name for the settings to update. "organizations/[
3842
+ # ORGANIZATION_ID]/settings" For example:"organizations/12345/settings"Note:
3843
+ # Settings for the Log Router can currently only be configured for Google Cloud
3844
+ # organizations. Once configured, it applies to all projects and folders in the
3845
+ # Google Cloud organization.
3846
+ # @param [Google::Apis::LoggingV2::Settings] settings_object
3847
+ # @param [String] update_mask
3848
+ # Optional. Field mask identifying which fields from settings should be updated.
3849
+ # A field will be overwritten if and only if it is in the update mask. Output
3850
+ # only fields cannot be updated.See FieldMask for more information.For example: "
3851
+ # updateMask=kmsKeyName"
3852
+ # @param [String] fields
3853
+ # Selector specifying which fields to include in a partial response.
3854
+ # @param [String] quota_user
3855
+ # Available to use for quota purposes for server-side applications. Can be any
3856
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3857
+ # @param [Google::Apis::RequestOptions] options
3858
+ # Request-specific options
3859
+ #
3860
+ # @yield [result, err] Result & error if block supplied
3861
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
3862
+ # @yieldparam err [StandardError] error object if request failed
3863
+ #
3864
+ # @return [Google::Apis::LoggingV2::Settings]
3865
+ #
3866
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3867
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3868
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3869
+ def update_organization_settings(name, settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
3870
+ command = make_simple_command(:patch, 'v2/{+name}/settings', options)
3871
+ command.request_representation = Google::Apis::LoggingV2::Settings::Representation
3872
+ command.request_object = settings_object
3873
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
3874
+ command.response_class = Google::Apis::LoggingV2::Settings
3875
+ command.params['name'] = name unless name.nil?
3876
+ command.query['updateMask'] = update_mask unless update_mask.nil?
3877
+ command.query['fields'] = fields unless fields.nil?
3878
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3879
+ execute_or_queue_command(command, &block)
3880
+ end
3881
+
3705
3882
  # Creates a new exclusion in the _Default sink in a specified parent resource.
3706
3883
  # Only log entries belonging to that resource can be excluded. You can have up
3707
3884
  # to 10 exclusions in a resource.
@@ -4904,7 +5081,7 @@ module Google
4904
5081
  # Router can be configured for Google Cloud projects, folders, organizations and
4905
5082
  # billing accounts. Once configured for an organization, it applies to all
4906
5083
  # projects and folders in the Google Cloud organization.See Enabling CMEK for
4907
- # Logs Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
5084
+ # Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
4908
5085
  # for more information.
4909
5086
  # @param [String] name
4910
5087
  # Required. The resource for which to retrieve CMEK settings. "projects/[
@@ -4941,6 +5118,48 @@ module Google
4941
5118
  execute_or_queue_command(command, &block)
4942
5119
  end
4943
5120
 
5121
+ # Gets the Log Router settings for the given resource.Note: Settings for the Log
5122
+ # Router can be get for Google Cloud projects, folders, organizations and
5123
+ # billing accounts. Currently it can only be configured for organizations. Once
5124
+ # configured for an organization, it applies to all projects and folders in the
5125
+ # Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.
5126
+ # google.com/logging/docs/routing/managed-encryption) for more information.
5127
+ # @param [String] name
5128
+ # Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/
5129
+ # settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[
5130
+ # BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"
5131
+ # organizations/12345/settings"Note: Settings for the Log Router can be get for
5132
+ # Google Cloud projects, folders, organizations and billing accounts. Currently
5133
+ # it can only be configured for organizations. Once configured for an
5134
+ # organization, it applies to all projects and folders in the Google Cloud
5135
+ # organization.
5136
+ # @param [String] fields
5137
+ # Selector specifying which fields to include in a partial response.
5138
+ # @param [String] quota_user
5139
+ # Available to use for quota purposes for server-side applications. Can be any
5140
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
5141
+ # @param [Google::Apis::RequestOptions] options
5142
+ # Request-specific options
5143
+ #
5144
+ # @yield [result, err] Result & error if block supplied
5145
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
5146
+ # @yieldparam err [StandardError] error object if request failed
5147
+ #
5148
+ # @return [Google::Apis::LoggingV2::Settings]
5149
+ #
5150
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5151
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5152
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
5153
+ def get_project_settings(name, fields: nil, quota_user: nil, options: nil, &block)
5154
+ command = make_simple_command(:get, 'v2/{+name}/settings', options)
5155
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
5156
+ command.response_class = Google::Apis::LoggingV2::Settings
5157
+ command.params['name'] = name unless name.nil?
5158
+ command.query['fields'] = fields unless fields.nil?
5159
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
5160
+ execute_or_queue_command(command, &block)
5161
+ end
5162
+
4944
5163
  # Creates a new exclusion in the _Default sink in a specified parent resource.
4945
5164
  # Only log entries belonging to that resource can be excluded. You can have up
4946
5165
  # to 10 exclusions in a resource.
@@ -6538,7 +6757,7 @@ module Google
6538
6757
  # Router can be configured for Google Cloud projects, folders, organizations and
6539
6758
  # billing accounts. Once configured for an organization, it applies to all
6540
6759
  # projects and folders in the Google Cloud organization.See Enabling CMEK for
6541
- # Logs Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
6760
+ # Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
6542
6761
  # for more information.
6543
6762
  # @param [String] name
6544
6763
  # Required. The resource for which to retrieve CMEK settings. "projects/[
@@ -6575,6 +6794,48 @@ module Google
6575
6794
  execute_or_queue_command(command, &block)
6576
6795
  end
6577
6796
 
6797
+ # Gets the Log Router settings for the given resource.Note: Settings for the Log
6798
+ # Router can be get for Google Cloud projects, folders, organizations and
6799
+ # billing accounts. Currently it can only be configured for organizations. Once
6800
+ # configured for an organization, it applies to all projects and folders in the
6801
+ # Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.
6802
+ # google.com/logging/docs/routing/managed-encryption) for more information.
6803
+ # @param [String] name
6804
+ # Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/
6805
+ # settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[
6806
+ # BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"
6807
+ # organizations/12345/settings"Note: Settings for the Log Router can be get for
6808
+ # Google Cloud projects, folders, organizations and billing accounts. Currently
6809
+ # it can only be configured for organizations. Once configured for an
6810
+ # organization, it applies to all projects and folders in the Google Cloud
6811
+ # organization.
6812
+ # @param [String] fields
6813
+ # Selector specifying which fields to include in a partial response.
6814
+ # @param [String] quota_user
6815
+ # Available to use for quota purposes for server-side applications. Can be any
6816
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
6817
+ # @param [Google::Apis::RequestOptions] options
6818
+ # Request-specific options
6819
+ #
6820
+ # @yield [result, err] Result & error if block supplied
6821
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
6822
+ # @yieldparam err [StandardError] error object if request failed
6823
+ #
6824
+ # @return [Google::Apis::LoggingV2::Settings]
6825
+ #
6826
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
6827
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
6828
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
6829
+ def get_settings(name, fields: nil, quota_user: nil, options: nil, &block)
6830
+ command = make_simple_command(:get, 'v2/{+name}/settings', options)
6831
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
6832
+ command.response_class = Google::Apis::LoggingV2::Settings
6833
+ command.params['name'] = name unless name.nil?
6834
+ command.query['fields'] = fields unless fields.nil?
6835
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
6836
+ execute_or_queue_command(command, &block)
6837
+ end
6838
+
6578
6839
  # Updates the Log Router CMEK settings for the given resource.Note: CMEK for the
6579
6840
  # Log Router can currently only be configured for Google Cloud organizations.
6580
6841
  # Once configured, it applies to all projects and folders in the Google Cloud
@@ -6626,6 +6887,57 @@ module Google
6626
6887
  command.query['quotaUser'] = quota_user unless quota_user.nil?
6627
6888
  execute_or_queue_command(command, &block)
6628
6889
  end
6890
+
6891
+ # Updates the Log Router settings for the given resource.Note: Settings for the
6892
+ # Log Router can currently only be configured for Google Cloud organizations.
6893
+ # Once configured, it applies to all projects and folders in the Google Cloud
6894
+ # organization.UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the
6895
+ # associated service account does not have the required roles/cloudkms.
6896
+ # cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key
6897
+ # is disabled. 4) location_id is not supported by Logging. 5) location_id
6898
+ # violate OrgPolicy.See Enabling CMEK for Log Router (https://cloud.google.com/
6899
+ # logging/docs/routing/managed-encryption) for more information.
6900
+ # @param [String] name
6901
+ # Required. The resource name for the settings to update. "organizations/[
6902
+ # ORGANIZATION_ID]/settings" For example:"organizations/12345/settings"Note:
6903
+ # Settings for the Log Router can currently only be configured for Google Cloud
6904
+ # organizations. Once configured, it applies to all projects and folders in the
6905
+ # Google Cloud organization.
6906
+ # @param [Google::Apis::LoggingV2::Settings] settings_object
6907
+ # @param [String] update_mask
6908
+ # Optional. Field mask identifying which fields from settings should be updated.
6909
+ # A field will be overwritten if and only if it is in the update mask. Output
6910
+ # only fields cannot be updated.See FieldMask for more information.For example: "
6911
+ # updateMask=kmsKeyName"
6912
+ # @param [String] fields
6913
+ # Selector specifying which fields to include in a partial response.
6914
+ # @param [String] quota_user
6915
+ # Available to use for quota purposes for server-side applications. Can be any
6916
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
6917
+ # @param [Google::Apis::RequestOptions] options
6918
+ # Request-specific options
6919
+ #
6920
+ # @yield [result, err] Result & error if block supplied
6921
+ # @yieldparam result [Google::Apis::LoggingV2::Settings] parsed result object
6922
+ # @yieldparam err [StandardError] error object if request failed
6923
+ #
6924
+ # @return [Google::Apis::LoggingV2::Settings]
6925
+ #
6926
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
6927
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
6928
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
6929
+ def update_settings(name, settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
6930
+ command = make_simple_command(:patch, 'v2/{+name}/settings', options)
6931
+ command.request_representation = Google::Apis::LoggingV2::Settings::Representation
6932
+ command.request_object = settings_object
6933
+ command.response_representation = Google::Apis::LoggingV2::Settings::Representation
6934
+ command.response_class = Google::Apis::LoggingV2::Settings
6935
+ command.params['name'] = name unless name.nil?
6936
+ command.query['updateMask'] = update_mask unless update_mask.nil?
6937
+ command.query['fields'] = fields unless fields.nil?
6938
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
6939
+ execute_or_queue_command(command, &block)
6940
+ end
6629
6941
 
6630
6942
  protected
6631
6943
 
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.18.0
4
+ version: 0.22.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: 2021-12-06 00:00:00.000000000 Z
11
+ date: 2022-02-07 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.18.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-logging_v2/v0.22.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.2.17
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