google-cloud-logging 1.9.4 → 1.9.5

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: a9980a329d6ef79c9a98e7079e0c437d60431e98ef8cd17fdc7d9900c50a4172
4
- data.tar.gz: cd57f5d4b865b7af46a6daeb2d8f4086b6637bf8fee2804bf9708ad0c03ad995
3
+ metadata.gz: 91218db71bcf0f6192d7f93d9727fbfdfdc1e93a178d699f339af36c66762b4b
4
+ data.tar.gz: 3f06add4df2396e67067ef4a08c429fe8cb4ddb7a75ab337697a8ba2c1a17d8a
5
5
  SHA512:
6
- metadata.gz: 605c803ab1dd819748f97faa447a1d9c8ccd9b7db045dc63a159a4fa9ae0ea2236df32ee34c953efc327012a5cb0b5c4ef06974fd3a59585cd42f5439a6074e2
7
- data.tar.gz: d2245ba1433b7d0424ee0863fddfca5dca3fda26b1633371763338f2ac17d81c2e8a997b80e192b0bd1c0cdde1775574848c5e02ef1e6d08fe3d33f6eaf7e9fc
6
+ metadata.gz: b304bd0c18732eb582d3a0f083da1400d1b4d60620a9d3f649df38459763023b048c67df3aa0276cea41c004016e1dc328318c4ca6fe0bdb83394ced32a7fc66
7
+ data.tar.gz: ed07fdc87513ee53070dd2245748b100f2f7d5b6486badcae4128aa0e049938f4dd3e9caa4d6e52336f8039367bb608bac71f8a3f98e2dc94b5d4f098674cce7
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.9.5 / 2020-02-24
4
+
5
+ #### Documentation
6
+
7
+ * Fix doc links to Cmek methods in lower-level client
8
+
3
9
  ### 1.9.4 / 2020-01-23
4
10
 
5
11
  #### Documentation
@@ -461,6 +461,22 @@ module Google
461
461
  {'name' => request.name}
462
462
  end
463
463
  )
464
+ @get_cmek_settings = Google::Gax.create_api_call(
465
+ @config_service_v2_stub.method(:get_cmek_settings),
466
+ defaults["get_cmek_settings"],
467
+ exception_transformer: exception_transformer,
468
+ params_extractor: proc do |request|
469
+ {'name' => request.name}
470
+ end
471
+ )
472
+ @update_cmek_settings = Google::Gax.create_api_call(
473
+ @config_service_v2_stub.method(:update_cmek_settings),
474
+ defaults["update_cmek_settings"],
475
+ exception_transformer: exception_transformer,
476
+ params_extractor: proc do |request|
477
+ {'name' => request.name}
478
+ end
479
+ )
464
480
  end
465
481
 
466
482
  # Service calls
@@ -992,6 +1008,127 @@ module Google
992
1008
  @delete_exclusion.call(req, options, &block)
993
1009
  nil
994
1010
  end
1011
+
1012
+ # Gets the Logs Router CMEK settings for the given resource.
1013
+ #
1014
+ # Note: CMEK for the Logs Router can currently only be configured for GCP
1015
+ # organizations. Once configured, it applies to all projects and folders in
1016
+ # the GCP organization.
1017
+ #
1018
+ # See [Enabling CMEK for Logs
1019
+ # Router](/logging/docs/routing/managed-encryption) for more information.
1020
+ #
1021
+ # @param name [String]
1022
+ # Required. The resource for which to retrieve CMEK settings.
1023
+ #
1024
+ # "projects/[PROJECT_ID]/cmekSettings"
1025
+ # "organizations/[ORGANIZATION_ID]/cmekSettings"
1026
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
1027
+ # "folders/[FOLDER_ID]/cmekSettings"
1028
+ #
1029
+ # Example: `"organizations/12345/cmekSettings"`.
1030
+ #
1031
+ # Note: CMEK for the Logs Router can currently only be configured for GCP
1032
+ # organizations. Once configured, it applies to all projects and folders in
1033
+ # the GCP organization.
1034
+ # @param options [Google::Gax::CallOptions]
1035
+ # Overrides the default settings for this call, e.g, timeout,
1036
+ # retries, etc.
1037
+ # @yield [result, operation] Access the result along with the RPC operation
1038
+ # @yieldparam result [Google::Logging::V2::CmekSettings]
1039
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1040
+ # @return [Google::Logging::V2::CmekSettings]
1041
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1042
+ # @example
1043
+ # require "google/cloud/logging/v2"
1044
+ #
1045
+ # config_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
1046
+ # response = config_client.get_cmek_settings
1047
+
1048
+ def get_cmek_settings \
1049
+ name: nil,
1050
+ options: nil,
1051
+ &block
1052
+ req = {
1053
+ name: name
1054
+ }.delete_if { |_, v| v.nil? }
1055
+ req = Google::Gax::to_proto(req, Google::Logging::V2::GetCmekSettingsRequest)
1056
+ @get_cmek_settings.call(req, options, &block)
1057
+ end
1058
+
1059
+ # Updates the Logs Router CMEK settings for the given resource.
1060
+ #
1061
+ # Note: CMEK for the Logs Router can currently only be configured for GCP
1062
+ # organizations. Once configured, it applies to all projects and folders in
1063
+ # the GCP organization.
1064
+ #
1065
+ # {Google::Cloud::Logging::V2::ConfigServiceV2Client#update_cmek_settings}
1066
+ # will fail if 1) `kms_key_name` is invalid, or 2) the associated service
1067
+ # account does not have the required
1068
+ # `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or
1069
+ # 3) access to the key is disabled.
1070
+ #
1071
+ # See [Enabling CMEK for Logs
1072
+ # Router](/logging/docs/routing/managed-encryption) for more information.
1073
+ #
1074
+ # @param name [String]
1075
+ # Required. The resource name for the CMEK settings to update.
1076
+ #
1077
+ # "projects/[PROJECT_ID]/cmekSettings"
1078
+ # "organizations/[ORGANIZATION_ID]/cmekSettings"
1079
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
1080
+ # "folders/[FOLDER_ID]/cmekSettings"
1081
+ #
1082
+ # Example: `"organizations/12345/cmekSettings"`.
1083
+ #
1084
+ # Note: CMEK for the Logs Router can currently only be configured for GCP
1085
+ # organizations. Once configured, it applies to all projects and folders in
1086
+ # the GCP organization.
1087
+ # @param cmek_settings [Google::Logging::V2::CmekSettings | Hash]
1088
+ # Required. The CMEK settings to update.
1089
+ #
1090
+ # See [Enabling CMEK for Logs
1091
+ # Router](/logging/docs/routing/managed-encryption) for more information.
1092
+ # A hash of the same form as `Google::Logging::V2::CmekSettings`
1093
+ # can also be provided.
1094
+ # @param update_mask [Google::Protobuf::FieldMask | Hash]
1095
+ # Optional. Field mask identifying which fields from `cmek_settings` should
1096
+ # be updated. A field will be overwritten if and only if it is in the update
1097
+ # mask. Output only fields cannot be updated.
1098
+ #
1099
+ # See {Google::Protobuf::FieldMask FieldMask} for more information.
1100
+ #
1101
+ # Example: `"updateMask=kmsKeyName"`
1102
+ # A hash of the same form as `Google::Protobuf::FieldMask`
1103
+ # can also be provided.
1104
+ # @param options [Google::Gax::CallOptions]
1105
+ # Overrides the default settings for this call, e.g, timeout,
1106
+ # retries, etc.
1107
+ # @yield [result, operation] Access the result along with the RPC operation
1108
+ # @yieldparam result [Google::Logging::V2::CmekSettings]
1109
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1110
+ # @return [Google::Logging::V2::CmekSettings]
1111
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1112
+ # @example
1113
+ # require "google/cloud/logging/v2"
1114
+ #
1115
+ # config_client = Google::Cloud::Logging::V2::ConfigServiceV2Client.new
1116
+ # response = config_client.update_cmek_settings
1117
+
1118
+ def update_cmek_settings \
1119
+ name: nil,
1120
+ cmek_settings: nil,
1121
+ update_mask: nil,
1122
+ options: nil,
1123
+ &block
1124
+ req = {
1125
+ name: name,
1126
+ cmek_settings: cmek_settings,
1127
+ update_mask: update_mask
1128
+ }.delete_if { |_, v| v.nil? }
1129
+ req = Google::Gax::to_proto(req, Google::Logging::V2::UpdateCmekSettingsRequest)
1130
+ @update_cmek_settings.call(req, options, &block)
1131
+ end
995
1132
  end
996
1133
  end
997
1134
  end
@@ -7,7 +7,11 @@
7
7
  "INTERNAL",
8
8
  "UNAVAILABLE"
9
9
  ],
10
- "non_idempotent": []
10
+ "non_idempotent": [],
11
+ "idempotent2": [
12
+ "DEADLINE_EXCEEDED",
13
+ "UNAVAILABLE"
14
+ ]
11
15
  },
12
16
  "retry_params": {
13
17
  "default": {
@@ -79,6 +83,16 @@
79
83
  "timeout_millis": 60000,
80
84
  "retry_codes_name": "idempotent",
81
85
  "retry_params_name": "default"
86
+ },
87
+ "GetCmekSettings": {
88
+ "timeout_millis": 60000,
89
+ "retry_codes_name": "idempotent2",
90
+ "retry_params_name": "default"
91
+ },
92
+ "UpdateCmekSettings": {
93
+ "timeout_millis": 60000,
94
+ "retry_codes_name": "non_idempotent",
95
+ "retry_params_name": "default"
82
96
  }
83
97
  }
84
98
  }
@@ -90,10 +90,15 @@ module Google
90
90
  # @return [String]
91
91
  # Optional. A unique identifier for the log entry. If you provide a value,
92
92
  # then Logging considers other log entries in the same project, with the same
93
- # `timestamp`, and with the same `insert_id` to be duplicates which can be
94
- # removed. If omitted in new log entries, then Logging assigns its own unique
95
- # identifier. The `insert_id` is also used to order log entries that have the
96
- # same `timestamp` value.
93
+ # `timestamp`, and with the same `insert_id` to be duplicates which are
94
+ # removed in a single query result. However, there are no guarantees of
95
+ # de-duplication in the export of logs.
96
+ #
97
+ # If the `insert_id` is omitted when writing a log entry, the Logging API
98
+ # assigns its own unique identifier in this field.
99
+ #
100
+ # In queries, the `insert_id` is also used to order log entries that have
101
+ # the same `log_name` and `timestamp` values.
97
102
  # @!attribute [rw] http_request
98
103
  # @return [Google::Logging::Type::HttpRequest]
99
104
  # Optional. Information about the HTTP request associated with this log
@@ -133,7 +133,7 @@ module Google
133
133
  # @!attribute [rw] filter
134
134
  # @return [String]
135
135
  # Optional. A filter that chooses which log entries to return. See [Advanced
136
- # Logs Filters](/logging/docs/view/advanced_filters). Only log entries that
136
+ # Logs Queries](/logging/docs/view/advanced-queries). Only log entries that
137
137
  # match the filter are returned. An empty filter matches all log entries in
138
138
  # the resources listed in `resource_names`. Referencing a parent resource
139
139
  # that is not listed in `resource_names` will cause the filter to return no
@@ -27,7 +27,7 @@ module Google
27
27
  # project. Example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are
28
28
  # limited to 100 characters and can include only the following characters:
29
29
  # upper and lower-case alphanumeric characters, underscores, hyphens, and
30
- # periods.
30
+ # periods. First character has to be alphanumeric.
31
31
  # @!attribute [rw] destination
32
32
  # @return [String]
33
33
  # Required. The export destination:
@@ -47,6 +47,14 @@ module Google
47
47
  # that match the filter. For example:
48
48
  #
49
49
  # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
50
+ # @!attribute [rw] description
51
+ # @return [String]
52
+ # Optional. A description of this sink.
53
+ # The maximum length of the description is 8000 characters.
54
+ # @!attribute [rw] disabled
55
+ # @return [true, false]
56
+ # Optional. If set to True, then this sink is disabled and it does not
57
+ # export any log entries.
50
58
  # @!attribute [rw] output_version_format
51
59
  # @return [Google::Logging::V2::LogSink::VersionFormat]
52
60
  # Deprecated. The log entry format to use for this sink's exported log
@@ -127,6 +135,14 @@ module Google
127
135
  # present and [special query
128
136
  # syntax](/bigquery/docs/querying-partitioned-tables) has to be used instead.
129
137
  # In both cases, tables are sharded based on UTC timezone.
138
+ # @!attribute [rw] uses_timestamp_column_partitioning
139
+ # @return [true, false]
140
+ # Output only. True if new timestamp column based partitioning is in use,
141
+ # false if legacy ingestion-time partitioning is in use.
142
+ # All new sinks will have this field set true and will use timestamp column
143
+ # based partitioning. If use_partitioned_tables is false, this value has no
144
+ # meaning and will be false. Legacy sinks using partitioned tables will have
145
+ # this field set to false.
130
146
  class BigQueryOptions; end
131
147
 
132
148
  # The parameters to `ListSinks`.
@@ -277,6 +293,7 @@ module Google
277
293
  # Required. A client-assigned identifier, such as
278
294
  # `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
279
295
  # can include only letters, digits, underscores, hyphens, and periods.
296
+ # First character has to be alphanumeric.
280
297
  # @!attribute [rw] description
281
298
  # @return [String]
282
299
  # Optional. A description of this exclusion.
@@ -409,6 +426,116 @@ module Google
409
426
  #
410
427
  # Example: `"projects/my-project-id/exclusions/my-exclusion-id"`.
411
428
  class DeleteExclusionRequest; end
429
+
430
+ # The parameters to
431
+ # {Google::Cloud::Logging::V2::ConfigServiceV2Client#get_cmek_settings}.
432
+ #
433
+ # See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
434
+ # for more information.
435
+ # @!attribute [rw] name
436
+ # @return [String]
437
+ # Required. The resource for which to retrieve CMEK settings.
438
+ #
439
+ # "projects/[PROJECT_ID]/cmekSettings"
440
+ # "organizations/[ORGANIZATION_ID]/cmekSettings"
441
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
442
+ # "folders/[FOLDER_ID]/cmekSettings"
443
+ #
444
+ # Example: `"organizations/12345/cmekSettings"`.
445
+ #
446
+ # Note: CMEK for the Logs Router can currently only be configured for GCP
447
+ # organizations. Once configured, it applies to all projects and folders in
448
+ # the GCP organization.
449
+ class GetCmekSettingsRequest; end
450
+
451
+ # The parameters to
452
+ # {Google::Cloud::Logging::V2::ConfigServiceV2Client#update_cmek_settings}.
453
+ #
454
+ # See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
455
+ # for more information.
456
+ # @!attribute [rw] name
457
+ # @return [String]
458
+ # Required. The resource name for the CMEK settings to update.
459
+ #
460
+ # "projects/[PROJECT_ID]/cmekSettings"
461
+ # "organizations/[ORGANIZATION_ID]/cmekSettings"
462
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
463
+ # "folders/[FOLDER_ID]/cmekSettings"
464
+ #
465
+ # Example: `"organizations/12345/cmekSettings"`.
466
+ #
467
+ # Note: CMEK for the Logs Router can currently only be configured for GCP
468
+ # organizations. Once configured, it applies to all projects and folders in
469
+ # the GCP organization.
470
+ # @!attribute [rw] cmek_settings
471
+ # @return [Google::Logging::V2::CmekSettings]
472
+ # Required. The CMEK settings to update.
473
+ #
474
+ # See [Enabling CMEK for Logs
475
+ # Router](/logging/docs/routing/managed-encryption) for more information.
476
+ # @!attribute [rw] update_mask
477
+ # @return [Google::Protobuf::FieldMask]
478
+ # Optional. Field mask identifying which fields from `cmek_settings` should
479
+ # be updated. A field will be overwritten if and only if it is in the update
480
+ # mask. Output only fields cannot be updated.
481
+ #
482
+ # See {Google::Protobuf::FieldMask FieldMask} for more information.
483
+ #
484
+ # Example: `"updateMask=kmsKeyName"`
485
+ class UpdateCmekSettingsRequest; end
486
+
487
+ # Describes the customer-managed encryption key (CMEK) settings associated with
488
+ # a project, folder, organization, billing account, or flexible resource.
489
+ #
490
+ # Note: CMEK for the Logs Router can currently only be configured for GCP
491
+ # organizations. Once configured, it applies to all projects and folders in the
492
+ # GCP organization.
493
+ #
494
+ # See [Enabling CMEK for Logs Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
495
+ # for more information.
496
+ # @!attribute [rw] name
497
+ # @return [String]
498
+ # Output Only. The resource name of the CMEK settings.
499
+ # @!attribute [rw] kms_key_name
500
+ # @return [String]
501
+ # The resource name for the configured Cloud KMS key.
502
+ #
503
+ # KMS key name format:
504
+ # "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
505
+ #
506
+ # For example:
507
+ # `"projects/my-project-id/locations/my-region/keyRings/key-ring-name/cryptoKeys/key-name"`
508
+ #
509
+ #
510
+ #
511
+ # To enable CMEK for the Logs Router, set this field to a valid
512
+ # `kms_key_name` for which the associated service account has the required
513
+ # `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key.
514
+ #
515
+ # The Cloud KMS key used by the Log Router can be updated by changing the
516
+ # `kms_key_name` to a new valid key name. Encryption operations that are in
517
+ # progress will be completed with the key that was in use when they started.
518
+ # Decryption operations will be completed using the key that was used at the
519
+ # time of encryption unless access to that key has been revoked.
520
+ #
521
+ # To disable CMEK for the Logs Router, set this field to an empty string.
522
+ #
523
+ # See [Enabling CMEK for Logs
524
+ # Router](/logging/docs/routing/managed-encryption) for more information.
525
+ # @!attribute [rw] service_account_id
526
+ # @return [String]
527
+ # Output Only. The service account that will be used by the Logs Router to
528
+ # access your Cloud KMS key.
529
+ #
530
+ # Before enabling CMEK for Logs Router, you must first assign the role
531
+ # `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
532
+ # the Logs Router will use to access your Cloud KMS key. Use
533
+ # {Google::Cloud::Logging::V2::ConfigServiceV2Client#get_cmek_settings} to
534
+ # obtain the service account ID.
535
+ #
536
+ # See [Enabling CMEK for Logs
537
+ # Router](/logging/docs/routing/managed-encryption) for more information.
538
+ class CmekSettings; end
412
539
  end
413
540
  end
414
541
  end
@@ -174,7 +174,7 @@ module Google
174
174
  # The parameters to GetLogMetric.
175
175
  # @!attribute [rw] metric_name
176
176
  # @return [String]
177
- # The resource name of the desired metric:
177
+ # Required. The resource name of the desired metric:
178
178
  #
179
179
  # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
180
180
  class GetLogMetricRequest; end
@@ -182,21 +182,21 @@ module Google
182
182
  # The parameters to CreateLogMetric.
183
183
  # @!attribute [rw] parent
184
184
  # @return [String]
185
- # The resource name of the project in which to create the metric:
185
+ # Required. The resource name of the project in which to create the metric:
186
186
  #
187
187
  # "projects/[PROJECT_ID]"
188
188
  #
189
189
  # The new metric must be provided in the request.
190
190
  # @!attribute [rw] metric
191
191
  # @return [Google::Logging::V2::LogMetric]
192
- # The new logs-based metric, which must not have an identifier that
192
+ # Required. The new logs-based metric, which must not have an identifier that
193
193
  # already exists.
194
194
  class CreateLogMetricRequest; end
195
195
 
196
196
  # The parameters to UpdateLogMetric.
197
197
  # @!attribute [rw] metric_name
198
198
  # @return [String]
199
- # The resource name of the metric to update:
199
+ # Required. The resource name of the metric to update:
200
200
  #
201
201
  # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
202
202
  #
@@ -205,13 +205,13 @@ module Google
205
205
  # does not exist in `[PROJECT_ID]`, then a new metric is created.
206
206
  # @!attribute [rw] metric
207
207
  # @return [Google::Logging::V2::LogMetric]
208
- # The updated metric.
208
+ # Required. The updated metric.
209
209
  class UpdateLogMetricRequest; end
210
210
 
211
211
  # The parameters to DeleteLogMetric.
212
212
  # @!attribute [rw] metric_name
213
213
  # @return [String]
214
- # The resource name of the metric to delete:
214
+ # Required. The resource name of the metric to delete:
215
215
  #
216
216
  # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
217
217
  class DeleteLogMetricRequest; end
@@ -365,10 +365,10 @@ module Google
365
365
 
366
366
  # Service calls
367
367
 
368
- # Deletes all the log entries in a log.
369
- # The log reappears if it receives new entries.
370
- # Log entries written shortly before the delete operation might not be
371
- # deleted.
368
+ # Deletes all the log entries in a log. The log reappears if it receives new
369
+ # entries. Log entries written shortly before the delete operation might not
370
+ # be deleted. Entries received after the delete operation with a timestamp
371
+ # before the operation will be deleted.
372
372
  #
373
373
  # @param log_name [String]
374
374
  # Required. The resource name of the log to delete:
@@ -546,7 +546,7 @@ module Google
546
546
  # `"my-project-1A"`.
547
547
  # @param filter [String]
548
548
  # Optional. A filter that chooses which log entries to return. See [Advanced
549
- # Logs Filters](/logging/docs/view/advanced_filters). Only log entries that
549
+ # Logs Queries](/logging/docs/view/advanced-queries). Only log entries that
550
550
  # match the filter are returned. An empty filter matches all log entries in
551
551
  # the resources listed in `resource_names`. Referencing a parent resource
552
552
  # that is not listed in `resource_names` will cause the filter to return no
@@ -361,7 +361,7 @@ module Google
361
361
  # Gets a logs-based metric.
362
362
  #
363
363
  # @param metric_name [String]
364
- # The resource name of the desired metric:
364
+ # Required. The resource name of the desired metric:
365
365
  #
366
366
  # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
367
367
  # @param options [Google::Gax::CallOptions]
@@ -393,13 +393,13 @@ module Google
393
393
  # Creates a logs-based metric.
394
394
  #
395
395
  # @param parent [String]
396
- # The resource name of the project in which to create the metric:
396
+ # Required. The resource name of the project in which to create the metric:
397
397
  #
398
398
  # "projects/[PROJECT_ID]"
399
399
  #
400
400
  # The new metric must be provided in the request.
401
401
  # @param metric [Google::Logging::V2::LogMetric | Hash]
402
- # The new logs-based metric, which must not have an identifier that
402
+ # Required. The new logs-based metric, which must not have an identifier that
403
403
  # already exists.
404
404
  # A hash of the same form as `Google::Logging::V2::LogMetric`
405
405
  # can also be provided.
@@ -437,7 +437,7 @@ module Google
437
437
  # Creates or updates a logs-based metric.
438
438
  #
439
439
  # @param metric_name [String]
440
- # The resource name of the metric to update:
440
+ # Required. The resource name of the metric to update:
441
441
  #
442
442
  # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
443
443
  #
@@ -445,7 +445,7 @@ module Google
445
445
  # `name` field must be the same as `[METRIC_ID]` If the metric
446
446
  # does not exist in `[PROJECT_ID]`, then a new metric is created.
447
447
  # @param metric [Google::Logging::V2::LogMetric | Hash]
448
- # The updated metric.
448
+ # Required. The updated metric.
449
449
  # A hash of the same form as `Google::Logging::V2::LogMetric`
450
450
  # can also be provided.
451
451
  # @param options [Google::Gax::CallOptions]
@@ -482,7 +482,7 @@ module Google
482
482
  # Deletes a logs-based metric.
483
483
  #
484
484
  # @param metric_name [String]
485
- # The resource name of the metric to delete:
485
+ # Required. The resource name of the metric to delete:
486
486
  #
487
487
  # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
488
488
  # @param options [Google::Gax::CallOptions]
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Logging
19
- VERSION = "1.9.4".freeze
19
+ VERSION = "1.9.5".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -5,6 +5,7 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
  require 'google/api/monitored_resource_pb'
8
+ require 'google/api/resource_pb'
8
9
  require 'google/logging/type/http_request_pb'
9
10
  require 'google/logging/type/log_severity_pb'
10
11
  require 'google/protobuf/any_pb'
@@ -4,17 +4,21 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
7
10
  require 'google/protobuf/duration_pb'
8
11
  require 'google/protobuf/empty_pb'
9
12
  require 'google/protobuf/field_mask_pb'
10
13
  require 'google/protobuf/timestamp_pb'
11
14
  require 'google/api/annotations_pb'
12
- require 'google/api/client_pb'
13
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
16
  add_message "google.logging.v2.LogSink" do
15
17
  optional :name, :string, 1
16
18
  optional :destination, :string, 3
17
19
  optional :filter, :string, 5
20
+ optional :description, :string, 18
21
+ optional :disabled, :bool, 19
18
22
  optional :output_version_format, :enum, 6, "google.logging.v2.LogSink.VersionFormat"
19
23
  optional :writer_identity, :string, 8
20
24
  optional :include_children, :bool, 9
@@ -33,6 +37,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
33
37
  end
34
38
  add_message "google.logging.v2.BigQueryOptions" do
35
39
  optional :use_partitioned_tables, :bool, 1
40
+ optional :uses_timestamp_column_partitioning, :bool, 3
36
41
  end
37
42
  add_message "google.logging.v2.ListSinksRequest" do
38
43
  optional :parent, :string, 1
@@ -92,6 +97,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
92
97
  add_message "google.logging.v2.DeleteExclusionRequest" do
93
98
  optional :name, :string, 1
94
99
  end
100
+ add_message "google.logging.v2.GetCmekSettingsRequest" do
101
+ optional :name, :string, 1
102
+ end
103
+ add_message "google.logging.v2.UpdateCmekSettingsRequest" do
104
+ optional :name, :string, 1
105
+ optional :cmek_settings, :message, 2, "google.logging.v2.CmekSettings"
106
+ optional :update_mask, :message, 3, "google.protobuf.FieldMask"
107
+ end
108
+ add_message "google.logging.v2.CmekSettings" do
109
+ optional :name, :string, 1
110
+ optional :kms_key_name, :string, 2
111
+ optional :service_account_id, :string, 3
112
+ end
95
113
  end
96
114
 
97
115
  module Google
@@ -113,6 +131,9 @@ module Google
113
131
  CreateExclusionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CreateExclusionRequest").msgclass
114
132
  UpdateExclusionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateExclusionRequest").msgclass
115
133
  DeleteExclusionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.DeleteExclusionRequest").msgclass
134
+ GetCmekSettingsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.GetCmekSettingsRequest").msgclass
135
+ UpdateCmekSettingsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.UpdateCmekSettingsRequest").msgclass
136
+ CmekSettings = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.logging.v2.CmekSettings").msgclass
116
137
  end
117
138
  end
118
139
  end
@@ -64,6 +64,30 @@ module Google
64
64
  rpc :UpdateExclusion, UpdateExclusionRequest, LogExclusion
65
65
  # Deletes an exclusion.
66
66
  rpc :DeleteExclusion, DeleteExclusionRequest, Google::Protobuf::Empty
67
+ # Gets the Logs Router CMEK settings for the given resource.
68
+ #
69
+ # Note: CMEK for the Logs Router can currently only be configured for GCP
70
+ # organizations. Once configured, it applies to all projects and folders in
71
+ # the GCP organization.
72
+ #
73
+ # See [Enabling CMEK for Logs
74
+ # Router](/logging/docs/routing/managed-encryption) for more information.
75
+ rpc :GetCmekSettings, GetCmekSettingsRequest, CmekSettings
76
+ # Updates the Logs Router CMEK settings for the given resource.
77
+ #
78
+ # Note: CMEK for the Logs Router can currently only be configured for GCP
79
+ # organizations. Once configured, it applies to all projects and folders in
80
+ # the GCP organization.
81
+ #
82
+ # [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]
83
+ # will fail if 1) `kms_key_name` is invalid, or 2) the associated service
84
+ # account does not have the required
85
+ # `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or
86
+ # 3) access to the key is disabled.
87
+ #
88
+ # See [Enabling CMEK for Logs
89
+ # Router](/logging/docs/routing/managed-encryption) for more information.
90
+ rpc :UpdateCmekSettings, UpdateCmekSettingsRequest, CmekSettings
67
91
  end
68
92
 
69
93
  Stub = Service.rpc_stub_class
@@ -4,13 +4,16 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
+ require 'google/api/client_pb'
7
8
  require 'google/api/distribution_pb'
9
+ require 'google/api/field_behavior_pb'
8
10
  require 'google/api/metric_pb'
11
+ require 'google/api/resource_pb'
12
+ require 'google/protobuf/duration_pb'
9
13
  require 'google/protobuf/empty_pb'
10
14
  require 'google/protobuf/field_mask_pb'
11
15
  require 'google/protobuf/timestamp_pb'
12
16
  require 'google/api/annotations_pb'
13
- require 'google/api/client_pb'
14
17
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
18
  add_message "google.logging.v2.LogMetric" do
16
19
  optional :name, :string, 1
@@ -4,15 +4,17 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
+ require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
7
10
  require 'google/api/monitored_resource_pb'
11
+ require 'google/api/resource_pb'
8
12
  require 'google/logging/v2/log_entry_pb'
9
13
  require 'google/logging/v2/logging_config_pb'
10
14
  require 'google/protobuf/duration_pb'
11
15
  require 'google/protobuf/empty_pb'
12
16
  require 'google/protobuf/timestamp_pb'
13
17
  require 'google/rpc/status_pb'
14
- require 'google/api/annotations_pb'
15
- require 'google/api/client_pb'
16
18
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
19
  add_message "google.logging.v2.DeleteLogRequest" do
18
20
  optional :log_name, :string, 1
@@ -34,10 +34,10 @@ module Google
34
34
  self.unmarshal_class_method = :decode
35
35
  self.service_name = 'google.logging.v2.LoggingServiceV2'
36
36
 
37
- # Deletes all the log entries in a log.
38
- # The log reappears if it receives new entries.
39
- # Log entries written shortly before the delete operation might not be
40
- # deleted.
37
+ # Deletes all the log entries in a log. The log reappears if it receives new
38
+ # entries. Log entries written shortly before the delete operation might not
39
+ # be deleted. Entries received after the delete operation with a timestamp
40
+ # before the operation will be deleted.
41
41
  rpc :DeleteLog, DeleteLogRequest, Google::Protobuf::Empty
42
42
  # Writes log entries to Logging. This API method is the
43
43
  # only way to send log entries to Logging. This method
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.4
4
+ version: 1.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-01-23 00:00:00.000000000 Z
12
+ date: 2020-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core