aws-sdk-cloudwatchlogs 1.55.0 → 1.57.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 +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-cloudwatchlogs/client.rb +515 -129
- data/lib/aws-sdk-cloudwatchlogs/client_api.rb +87 -0
- data/lib/aws-sdk-cloudwatchlogs/endpoint_parameters.rb +3 -0
- data/lib/aws-sdk-cloudwatchlogs/endpoint_provider.rb +84 -85
- data/lib/aws-sdk-cloudwatchlogs/endpoints.rb +42 -0
- data/lib/aws-sdk-cloudwatchlogs/plugins/endpoints.rb +6 -0
- data/lib/aws-sdk-cloudwatchlogs/types.rb +429 -104
- data/lib/aws-sdk-cloudwatchlogs.rb +1 -1
- metadata +2 -2
@@ -378,24 +378,24 @@ module Aws::CloudWatchLogs
|
|
378
378
|
|
379
379
|
# @!group API Operations
|
380
380
|
|
381
|
-
# Associates the specified
|
382
|
-
# (CMK) with the specified log group.
|
381
|
+
# Associates the specified KMS key with the specified log group.
|
383
382
|
#
|
384
|
-
# Associating
|
385
|
-
# associations between the log group and a
|
383
|
+
# Associating a KMS key with a log group overrides any existing
|
384
|
+
# associations between the log group and a KMS key. After a KMS key is
|
386
385
|
# associated with a log group, all newly ingested data for the log group
|
387
|
-
# is encrypted using the
|
388
|
-
# data encrypted with the
|
389
|
-
# enables CloudWatch Logs to decrypt this data whenever it is
|
386
|
+
# is encrypted using the KMS key. This association is stored as long as
|
387
|
+
# the data encrypted with the KMS keyis still within CloudWatch Logs.
|
388
|
+
# This enables CloudWatch Logs to decrypt this data whenever it is
|
389
|
+
# requested.
|
390
390
|
#
|
391
|
-
# CloudWatch Logs supports only symmetric
|
392
|
-
# an asymmetric
|
393
|
-
# [Using Symmetric and Asymmetric Keys][1].
|
391
|
+
# CloudWatch Logs supports only symmetric KMS keys. Do not use an
|
392
|
+
# associate an asymmetric KMS key with your log group. For more
|
393
|
+
# information, see [Using Symmetric and Asymmetric Keys][1].
|
394
394
|
#
|
395
395
|
# It can take up to 5 minutes for this operation to take effect.
|
396
396
|
#
|
397
|
-
# If you attempt to associate a
|
398
|
-
# not exist or the
|
397
|
+
# If you attempt to associate a KMS key with a log group but the KMS key
|
398
|
+
# does not exist or the KMS key is disabled, you receive an
|
399
399
|
# `InvalidParameterException` error.
|
400
400
|
#
|
401
401
|
#
|
@@ -406,10 +406,10 @@ module Aws::CloudWatchLogs
|
|
406
406
|
# The name of the log group.
|
407
407
|
#
|
408
408
|
# @option params [required, String] :kms_key_id
|
409
|
-
# The Amazon Resource Name (ARN) of the
|
410
|
-
# data. This must be a symmetric
|
411
|
-
# Resource Names
|
412
|
-
#
|
409
|
+
# The Amazon Resource Name (ARN) of the KMS key to use when encrypting
|
410
|
+
# log data. This must be a symmetric KMS key. For more information, see
|
411
|
+
# [Amazon Resource Names][1] and [Using Symmetric and Asymmetric
|
412
|
+
# Keys][2].
|
413
413
|
#
|
414
414
|
#
|
415
415
|
#
|
@@ -458,12 +458,18 @@ module Aws::CloudWatchLogs
|
|
458
458
|
req.send_request(options)
|
459
459
|
end
|
460
460
|
|
461
|
-
# Creates an export task
|
462
|
-
#
|
461
|
+
# Creates an export task so that you can efficiently export data from a
|
462
|
+
# log group to an Amazon S3 bucket. When you perform a
|
463
463
|
# `CreateExportTask` operation, you must use credentials that have
|
464
464
|
# permission to write to the S3 bucket that you specify as the
|
465
465
|
# destination.
|
466
466
|
#
|
467
|
+
# Exporting log data to S3 buckets that are encrypted by KMS is
|
468
|
+
# supported. Exporting log data to Amazon S3 buckets that have S3 Object
|
469
|
+
# Lock enabled with a retention period is also supported.
|
470
|
+
#
|
471
|
+
# Exporting to S3 buckets that are encrypted with AES-256 is supported.
|
472
|
+
#
|
467
473
|
# This is an asynchronous call. If all the required information is
|
468
474
|
# provided, this operation initiates an export task and responds with
|
469
475
|
# the ID of the task. After the task has started, you can use
|
@@ -472,12 +478,15 @@ module Aws::CloudWatchLogs
|
|
472
478
|
# at a time. To cancel an export task, use [CancelExportTask][2].
|
473
479
|
#
|
474
480
|
# You can export logs from multiple log groups or multiple time ranges
|
475
|
-
# to the same S3 bucket. To separate
|
476
|
-
#
|
477
|
-
#
|
481
|
+
# to the same S3 bucket. To separate log data for each export task,
|
482
|
+
# specify a prefix to be used as the Amazon S3 key prefix for all
|
483
|
+
# exported objects.
|
478
484
|
#
|
479
|
-
#
|
480
|
-
#
|
485
|
+
# <note markdown="1"> Time-based sorting on chunks of log data inside an exported file is
|
486
|
+
# not guaranteed. You can sort the exported log field data by using
|
487
|
+
# Linux utilities.
|
488
|
+
#
|
489
|
+
# </note>
|
481
490
|
#
|
482
491
|
#
|
483
492
|
#
|
@@ -496,17 +505,20 @@ module Aws::CloudWatchLogs
|
|
496
505
|
#
|
497
506
|
# @option params [required, Integer] :from
|
498
507
|
# The start time of the range for the request, expressed as the number
|
499
|
-
# of milliseconds after Jan 1, 1970 00:00:00 UTC
|
508
|
+
# of milliseconds after `Jan 1, 1970 00:00:00 UTC`. Events with a
|
500
509
|
# timestamp earlier than this time are not exported.
|
501
510
|
#
|
502
511
|
# @option params [required, Integer] :to
|
503
512
|
# The end time of the range for the request, expressed as the number of
|
504
|
-
# milliseconds after Jan 1, 1970 00:00:00 UTC
|
513
|
+
# milliseconds after `Jan 1, 1970 00:00:00 UTC`. Events with a timestamp
|
505
514
|
# later than this time are not exported.
|
506
515
|
#
|
516
|
+
# You must specify a time that is not earlier than when this log group
|
517
|
+
# was created.
|
518
|
+
#
|
507
519
|
# @option params [required, String] :destination
|
508
520
|
# The name of S3 bucket for the exported log data. The bucket must be in
|
509
|
-
# the same Amazon Web Services
|
521
|
+
# the same Amazon Web Services Region.
|
510
522
|
#
|
511
523
|
# @option params [String] :destination_prefix
|
512
524
|
# The prefix used as the start of the key for every object exported. If
|
@@ -546,7 +558,7 @@ module Aws::CloudWatchLogs
|
|
546
558
|
#
|
547
559
|
# You must use the following guidelines when naming a log group:
|
548
560
|
#
|
549
|
-
# * Log group names must be unique within a
|
561
|
+
# * Log group names must be unique within a Region for an Amazon Web
|
550
562
|
# Services account.
|
551
563
|
#
|
552
564
|
# * Log group names can be between 1 and 512 characters long.
|
@@ -556,22 +568,21 @@ module Aws::CloudWatchLogs
|
|
556
568
|
# (period), and '#' (number sign)
|
557
569
|
#
|
558
570
|
# When you create a log group, by default the log events in the log
|
559
|
-
# group
|
571
|
+
# group do not expire. To set a retention policy so that events expire
|
560
572
|
# and are deleted after a specified time, use [PutRetentionPolicy][1].
|
561
573
|
#
|
562
|
-
# If you associate
|
563
|
-
#
|
564
|
-
#
|
565
|
-
#
|
566
|
-
# this data whenever it is requested.
|
574
|
+
# If you associate an KMS key with the log group, ingested data is
|
575
|
+
# encrypted using the KMS key. This association is stored as long as the
|
576
|
+
# data encrypted with the KMS key is still within CloudWatch Logs. This
|
577
|
+
# enables CloudWatch Logs to decrypt this data whenever it is requested.
|
567
578
|
#
|
568
|
-
# If you attempt to associate a
|
569
|
-
# not exist or the
|
579
|
+
# If you attempt to associate a KMS key with the log group but the KMS
|
580
|
+
# keydoes not exist or the KMS key is disabled, you receive an
|
570
581
|
# `InvalidParameterException` error.
|
571
582
|
#
|
572
|
-
# CloudWatch Logs supports only symmetric
|
573
|
-
# asymmetric
|
574
|
-
# Symmetric and Asymmetric Keys][2].
|
583
|
+
# CloudWatch Logs supports only symmetric KMS keys. Do not associate an
|
584
|
+
# asymmetric KMS key with your log group. For more information, see
|
585
|
+
# [Using Symmetric and Asymmetric Keys][2].
|
575
586
|
#
|
576
587
|
#
|
577
588
|
#
|
@@ -582,9 +593,8 @@ module Aws::CloudWatchLogs
|
|
582
593
|
# The name of the log group.
|
583
594
|
#
|
584
595
|
# @option params [String] :kms_key_id
|
585
|
-
# The Amazon Resource Name (ARN) of the
|
586
|
-
# data. For more information, see [Amazon Resource Names
|
587
|
-
# Management Service][1].
|
596
|
+
# The Amazon Resource Name (ARN) of the KMS key to use when encrypting
|
597
|
+
# log data. For more information, see [Amazon Resource Names][1].
|
588
598
|
#
|
589
599
|
#
|
590
600
|
#
|
@@ -638,7 +648,7 @@ module Aws::CloudWatchLogs
|
|
638
648
|
#
|
639
649
|
# * Log stream names can be between 1 and 512 characters long.
|
640
650
|
#
|
641
|
-
# *
|
651
|
+
# * Don't use ':' (colon) or '*' (asterisk) characters.
|
642
652
|
#
|
643
653
|
# @option params [required, String] :log_group_name
|
644
654
|
# The name of the log group.
|
@@ -664,6 +674,36 @@ module Aws::CloudWatchLogs
|
|
664
674
|
req.send_request(options)
|
665
675
|
end
|
666
676
|
|
677
|
+
# Deletes the data protection policy from the specified log group.
|
678
|
+
#
|
679
|
+
# For more information about data protection policies, see
|
680
|
+
# [PutDataProtectionPolicy][1].
|
681
|
+
#
|
682
|
+
#
|
683
|
+
#
|
684
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html
|
685
|
+
#
|
686
|
+
# @option params [required, String] :log_group_identifier
|
687
|
+
# The name or ARN of the log group that you want to delete the data
|
688
|
+
# protection policy for.
|
689
|
+
#
|
690
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
691
|
+
#
|
692
|
+
# @example Request syntax with placeholder values
|
693
|
+
#
|
694
|
+
# resp = client.delete_data_protection_policy({
|
695
|
+
# log_group_identifier: "LogGroupIdentifier", # required
|
696
|
+
# })
|
697
|
+
#
|
698
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDataProtectionPolicy AWS API Documentation
|
699
|
+
#
|
700
|
+
# @overload delete_data_protection_policy(params = {})
|
701
|
+
# @param [Hash] params ({})
|
702
|
+
def delete_data_protection_policy(params = {}, options = {})
|
703
|
+
req = build_request(:delete_data_protection_policy, params)
|
704
|
+
req.send_request(options)
|
705
|
+
end
|
706
|
+
|
667
707
|
# Deletes the specified destination, and eventually disables all the
|
668
708
|
# subscription filters that publish to it. This operation does not
|
669
709
|
# delete the physical resource encapsulated by the destination.
|
@@ -893,7 +933,7 @@ module Aws::CloudWatchLogs
|
|
893
933
|
#
|
894
934
|
# @option params [Integer] :limit
|
895
935
|
# The maximum number of items returned. If you don't specify a value,
|
896
|
-
# the default
|
936
|
+
# the default maximum value of 50 items is used.
|
897
937
|
#
|
898
938
|
# @return [Types::DescribeDestinationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
899
939
|
#
|
@@ -935,7 +975,7 @@ module Aws::CloudWatchLogs
|
|
935
975
|
#
|
936
976
|
# @option params [String] :task_id
|
937
977
|
# The ID of the export task. Specifying a task ID filters the results to
|
938
|
-
#
|
978
|
+
# one or zero export tasks.
|
939
979
|
#
|
940
980
|
# @option params [String] :status_code
|
941
981
|
# The status code of the export task. Specifying a status code filters
|
@@ -999,13 +1039,41 @@ module Aws::CloudWatchLogs
|
|
999
1039
|
# more information about using tags to control access, see [Controlling
|
1000
1040
|
# access to Amazon Web Services resources using tags][1].
|
1001
1041
|
#
|
1042
|
+
# If you are using CloudWatch cross-account observability, you can use
|
1043
|
+
# this operation in a monitoring account and view data from the linked
|
1044
|
+
# source accounts. For more information, see [CloudWatch cross-account
|
1045
|
+
# observability][2].
|
1046
|
+
#
|
1002
1047
|
#
|
1003
1048
|
#
|
1004
1049
|
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html
|
1050
|
+
# [2]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
1051
|
+
#
|
1052
|
+
# @option params [Array<String>] :account_identifiers
|
1053
|
+
# When `includeLinkedAccounts` is set to `True`, use this parameter to
|
1054
|
+
# specify the list of accounts to search. You can specify as many as 20
|
1055
|
+
# account IDs in the array.
|
1005
1056
|
#
|
1006
1057
|
# @option params [String] :log_group_name_prefix
|
1007
1058
|
# The prefix to match.
|
1008
1059
|
#
|
1060
|
+
# <note markdown="1"> `logGroupNamePrefix` and `logGroupNamePattern` are mutually exclusive.
|
1061
|
+
# Only one of these parameters can be passed.
|
1062
|
+
#
|
1063
|
+
# </note>
|
1064
|
+
#
|
1065
|
+
# @option params [String] :log_group_name_pattern
|
1066
|
+
# If you specify a string for this parameter, the operation returns only
|
1067
|
+
# log groups that have names that match the string based on a
|
1068
|
+
# case-sensitive substring search. For example, if you specify `Foo`,
|
1069
|
+
# log groups named `FooBar`, `aws/Foo`, and `GroupFoo` would match, but
|
1070
|
+
# `foo`, `F/o/o` and `Froo` would not match.
|
1071
|
+
#
|
1072
|
+
# <note markdown="1"> `logGroupNamePattern` and `logGroupNamePrefix` are mutually exclusive.
|
1073
|
+
# Only one of these parameters can be passed.
|
1074
|
+
#
|
1075
|
+
# </note>
|
1076
|
+
#
|
1009
1077
|
# @option params [String] :next_token
|
1010
1078
|
# The token for the next set of items to return. (You received this
|
1011
1079
|
# token from a previous call.)
|
@@ -1014,6 +1082,22 @@ module Aws::CloudWatchLogs
|
|
1014
1082
|
# The maximum number of items returned. If you don't specify a value,
|
1015
1083
|
# the default is up to 50 items.
|
1016
1084
|
#
|
1085
|
+
# @option params [Boolean] :include_linked_accounts
|
1086
|
+
# If you are using a monitoring account, set this to `True` to have the
|
1087
|
+
# operation return log groups in the accounts listed in
|
1088
|
+
# `accountIdentifiers`.
|
1089
|
+
#
|
1090
|
+
# If this parameter is set to `true` and `accountIdentifiers` contains a
|
1091
|
+
# null value, the operation returns all log groups in the monitoring
|
1092
|
+
# account and all log groups in all source accounts that are linked to
|
1093
|
+
# the monitoring account.
|
1094
|
+
#
|
1095
|
+
# <note markdown="1"> If you specify `includeLinkedAccounts` in your request, then
|
1096
|
+
# `metricFilterCount`, `retentionInDays`, and `storedBytes` are not
|
1097
|
+
# included in the response.
|
1098
|
+
#
|
1099
|
+
# </note>
|
1100
|
+
#
|
1017
1101
|
# @return [Types::DescribeLogGroupsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1018
1102
|
#
|
1019
1103
|
# * {Types::DescribeLogGroupsResponse#log_groups #log_groups} => Array<Types::LogGroup>
|
@@ -1024,9 +1108,12 @@ module Aws::CloudWatchLogs
|
|
1024
1108
|
# @example Request syntax with placeholder values
|
1025
1109
|
#
|
1026
1110
|
# resp = client.describe_log_groups({
|
1111
|
+
# account_identifiers: ["AccountId"],
|
1027
1112
|
# log_group_name_prefix: "LogGroupName",
|
1113
|
+
# log_group_name_pattern: "LogGroupNamePattern",
|
1028
1114
|
# next_token: "NextToken",
|
1029
1115
|
# limit: 1,
|
1116
|
+
# include_linked_accounts: false,
|
1030
1117
|
# })
|
1031
1118
|
#
|
1032
1119
|
# @example Response structure
|
@@ -1039,6 +1126,7 @@ module Aws::CloudWatchLogs
|
|
1039
1126
|
# resp.log_groups[0].arn #=> String
|
1040
1127
|
# resp.log_groups[0].stored_bytes #=> Integer
|
1041
1128
|
# resp.log_groups[0].kms_key_id #=> String
|
1129
|
+
# resp.log_groups[0].data_protection_status #=> String, one of "ACTIVATED", "DELETED", "ARCHIVED", "DISABLED"
|
1042
1130
|
# resp.next_token #=> String
|
1043
1131
|
#
|
1044
1132
|
# @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups AWS API Documentation
|
@@ -1057,9 +1145,33 @@ module Aws::CloudWatchLogs
|
|
1057
1145
|
# This operation has a limit of five transactions per second, after
|
1058
1146
|
# which transactions are throttled.
|
1059
1147
|
#
|
1148
|
+
# If you are using CloudWatch cross-account observability, you can use
|
1149
|
+
# this operation in a monitoring account and view data from the linked
|
1150
|
+
# source accounts. For more information, see [CloudWatch cross-account
|
1151
|
+
# observability][1].
|
1152
|
+
#
|
1153
|
+
#
|
1154
|
+
#
|
1155
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
1156
|
+
#
|
1060
1157
|
# @option params [required, String] :log_group_name
|
1061
1158
|
# The name of the log group.
|
1062
1159
|
#
|
1160
|
+
# <note markdown="1"> If you specify values for both `logGroupName` and
|
1161
|
+
# `logGroupIdentifier`, the action returns an
|
1162
|
+
# `InvalidParameterException` error.
|
1163
|
+
#
|
1164
|
+
# </note>
|
1165
|
+
#
|
1166
|
+
# @option params [String] :log_group_identifier
|
1167
|
+
# Specify either the name or ARN of the log group to view. If the log
|
1168
|
+
# group is in a source account and you are using a monitoring account,
|
1169
|
+
# you must use the log group ARN.
|
1170
|
+
#
|
1171
|
+
# If you specify values for both `logGroupName` and
|
1172
|
+
# `logGroupIdentifier`, the action returns an
|
1173
|
+
# `InvalidParameterException` error.
|
1174
|
+
#
|
1063
1175
|
# @option params [String] :log_stream_name_prefix
|
1064
1176
|
# The prefix to match.
|
1065
1177
|
#
|
@@ -1075,7 +1187,7 @@ module Aws::CloudWatchLogs
|
|
1075
1187
|
#
|
1076
1188
|
# `lastEventTimestamp` represents the time of the most recent log event
|
1077
1189
|
# in the log stream in CloudWatch Logs. This number is expressed as the
|
1078
|
-
# number of milliseconds after Jan 1, 1970 00:00:00 UTC
|
1190
|
+
# number of milliseconds after `Jan 1, 1970 00:00:00 UTC`.
|
1079
1191
|
# `lastEventTimestamp` updates on an eventual consistency basis. It
|
1080
1192
|
# typically updates in less than an hour from ingestion, but in rare
|
1081
1193
|
# situations might take longer.
|
@@ -1104,6 +1216,7 @@ module Aws::CloudWatchLogs
|
|
1104
1216
|
#
|
1105
1217
|
# resp = client.describe_log_streams({
|
1106
1218
|
# log_group_name: "LogGroupName", # required
|
1219
|
+
# log_group_identifier: "LogGroupIdentifier",
|
1107
1220
|
# log_stream_name_prefix: "LogStreamName",
|
1108
1221
|
# order_by: "LogStreamName", # accepts LogStreamName, LastEventTime
|
1109
1222
|
# descending: false,
|
@@ -1141,8 +1254,8 @@ module Aws::CloudWatchLogs
|
|
1141
1254
|
# The name of the log group.
|
1142
1255
|
#
|
1143
1256
|
# @option params [String] :filter_name_prefix
|
1144
|
-
# The prefix to match. CloudWatch Logs uses the value you set here
|
1145
|
-
# if you also include the `logGroupName` parameter in your request.
|
1257
|
+
# The prefix to match. CloudWatch Logs uses the value that you set here
|
1258
|
+
# only if you also include the `logGroupName` parameter in your request.
|
1146
1259
|
#
|
1147
1260
|
# @option params [String] :next_token
|
1148
1261
|
# The token for the next set of items to return. (You received this
|
@@ -1207,9 +1320,9 @@ module Aws::CloudWatchLogs
|
|
1207
1320
|
end
|
1208
1321
|
|
1209
1322
|
# Returns a list of CloudWatch Logs Insights queries that are scheduled,
|
1210
|
-
#
|
1211
|
-
#
|
1212
|
-
#
|
1323
|
+
# running, or have been run recently in this account. You can request
|
1324
|
+
# all queries or limit it to queries of a specific log group or queries
|
1325
|
+
# with a certain status.
|
1213
1326
|
#
|
1214
1327
|
# @option params [String] :log_group_name
|
1215
1328
|
# Limits the returned queries to only those for the specified log group.
|
@@ -1406,13 +1519,12 @@ module Aws::CloudWatchLogs
|
|
1406
1519
|
req.send_request(options)
|
1407
1520
|
end
|
1408
1521
|
|
1409
|
-
# Disassociates the associated
|
1410
|
-
# key (CMK) from the specified log group.
|
1522
|
+
# Disassociates the associated KMS key from the specified log group.
|
1411
1523
|
#
|
1412
|
-
# After the KMS
|
1524
|
+
# After the KMS key is disassociated from the log group, CloudWatch Logs
|
1413
1525
|
# stops encrypting newly ingested data for the log group. All previously
|
1414
1526
|
# ingested data remains encrypted, and CloudWatch Logs requires
|
1415
|
-
# permissions for the
|
1527
|
+
# permissions for the KMS key whenever the encrypted data is requested.
|
1416
1528
|
#
|
1417
1529
|
# Note that it can take up to 5 minutes for this operation to take
|
1418
1530
|
# effect.
|
@@ -1441,10 +1553,13 @@ module Aws::CloudWatchLogs
|
|
1441
1553
|
# log events or filter the results using a filter pattern, a time range,
|
1442
1554
|
# and the name of the log stream.
|
1443
1555
|
#
|
1556
|
+
# You must have the `logs;FilterLogEvents` permission to perform this
|
1557
|
+
# operation.
|
1558
|
+
#
|
1444
1559
|
# By default, this operation returns as many log events as can fit in 1
|
1445
|
-
# MB (up to 10,000 log events) or all the events found within the
|
1446
|
-
#
|
1447
|
-
# more log events available
|
1560
|
+
# MB (up to 10,000 log events) or all the events found within the
|
1561
|
+
# specified time range. If the results include a token, that means there
|
1562
|
+
# are more log events available. You can get additional results by
|
1448
1563
|
# specifying the token in a subsequent call. This operation can return
|
1449
1564
|
# empty results while there are more log events available through the
|
1450
1565
|
# token.
|
@@ -1453,9 +1568,33 @@ module Aws::CloudWatchLogs
|
|
1453
1568
|
# when the event was ingested by CloudWatch Logs, and the ID of the
|
1454
1569
|
# `PutLogEvents` request.
|
1455
1570
|
#
|
1571
|
+
# If you are using CloudWatch cross-account observability, you can use
|
1572
|
+
# this operation in a monitoring account and view data from the linked
|
1573
|
+
# source accounts. For more information, see [CloudWatch cross-account
|
1574
|
+
# observability][1].
|
1575
|
+
#
|
1576
|
+
#
|
1577
|
+
#
|
1578
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
1579
|
+
#
|
1456
1580
|
# @option params [required, String] :log_group_name
|
1457
1581
|
# The name of the log group to search.
|
1458
1582
|
#
|
1583
|
+
# <note markdown="1"> If you specify values for both `logGroupName` and
|
1584
|
+
# `logGroupIdentifier`, the action returns an
|
1585
|
+
# `InvalidParameterException` error.
|
1586
|
+
#
|
1587
|
+
# </note>
|
1588
|
+
#
|
1589
|
+
# @option params [String] :log_group_identifier
|
1590
|
+
# Specify either the name or ARN of the log group to view log events
|
1591
|
+
# from. If the log group is in a source account and you are using a
|
1592
|
+
# monitoring account, you must use the log group ARN.
|
1593
|
+
#
|
1594
|
+
# If you specify values for both `logGroupName` and
|
1595
|
+
# `logGroupIdentifier`, the action returns an
|
1596
|
+
# `InvalidParameterException` error.
|
1597
|
+
#
|
1459
1598
|
# @option params [Array<String>] :log_stream_names
|
1460
1599
|
# Filters the results to only logs from the log streams in this list.
|
1461
1600
|
#
|
@@ -1474,12 +1613,12 @@ module Aws::CloudWatchLogs
|
|
1474
1613
|
#
|
1475
1614
|
# @option params [Integer] :start_time
|
1476
1615
|
# The start of the time range, expressed as the number of milliseconds
|
1477
|
-
# after Jan 1, 1970 00:00:00 UTC
|
1616
|
+
# after `Jan 1, 1970 00:00:00 UTC`. Events with a timestamp before this
|
1478
1617
|
# time are not returned.
|
1479
1618
|
#
|
1480
1619
|
# @option params [Integer] :end_time
|
1481
1620
|
# The end of the time range, expressed as the number of milliseconds
|
1482
|
-
# after Jan 1, 1970 00:00:00 UTC
|
1621
|
+
# after `Jan 1, 1970 00:00:00 UTC`. Events with a timestamp later than
|
1483
1622
|
# this time are not returned.
|
1484
1623
|
#
|
1485
1624
|
# @option params [String] :filter_pattern
|
@@ -1500,16 +1639,22 @@ module Aws::CloudWatchLogs
|
|
1500
1639
|
# The maximum number of events to return. The default is 10,000 events.
|
1501
1640
|
#
|
1502
1641
|
# @option params [Boolean] :interleaved
|
1503
|
-
# If the value is true, the operation
|
1504
|
-
#
|
1505
|
-
#
|
1506
|
-
#
|
1507
|
-
#
|
1642
|
+
# If the value is true, the operation attempts to provide responses that
|
1643
|
+
# contain events from multiple log streams within the log group,
|
1644
|
+
# interleaved in a single response. If the value is false, all the
|
1645
|
+
# matched log events in the first log stream are searched first, then
|
1646
|
+
# those in the next log stream, and so on.
|
1647
|
+
#
|
1648
|
+
# **Important** As of June 17, 2019, this parameter is ignored and the
|
1649
|
+
# value is assumed to be true. The response from this operation always
|
1650
|
+
# interleaves events from multiple log streams within a log group.
|
1508
1651
|
#
|
1509
|
-
#
|
1510
|
-
#
|
1511
|
-
#
|
1512
|
-
#
|
1652
|
+
# @option params [Boolean] :unmask
|
1653
|
+
# Specify `true` to display the log event fields with all sensitive data
|
1654
|
+
# unmasked and visible. The default is `false`.
|
1655
|
+
#
|
1656
|
+
# To use this operation with this parameter, you must be signed into an
|
1657
|
+
# account with the `logs:Unmask` permission.
|
1513
1658
|
#
|
1514
1659
|
# @return [Types::FilterLogEventsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1515
1660
|
#
|
@@ -1523,6 +1668,7 @@ module Aws::CloudWatchLogs
|
|
1523
1668
|
#
|
1524
1669
|
# resp = client.filter_log_events({
|
1525
1670
|
# log_group_name: "LogGroupName", # required
|
1671
|
+
# log_group_identifier: "LogGroupIdentifier",
|
1526
1672
|
# log_stream_names: ["LogStreamName"],
|
1527
1673
|
# log_stream_name_prefix: "LogStreamName",
|
1528
1674
|
# start_time: 1,
|
@@ -1531,6 +1677,7 @@ module Aws::CloudWatchLogs
|
|
1531
1677
|
# next_token: "NextToken",
|
1532
1678
|
# limit: 1,
|
1533
1679
|
# interleaved: false,
|
1680
|
+
# unmask: false,
|
1534
1681
|
# })
|
1535
1682
|
#
|
1536
1683
|
# @example Response structure
|
@@ -1555,6 +1702,39 @@ module Aws::CloudWatchLogs
|
|
1555
1702
|
req.send_request(options)
|
1556
1703
|
end
|
1557
1704
|
|
1705
|
+
# Returns information about a log group data protection policy.
|
1706
|
+
#
|
1707
|
+
# @option params [required, String] :log_group_identifier
|
1708
|
+
# The name or ARN of the log group that contains the data protection
|
1709
|
+
# policy that you want to see.
|
1710
|
+
#
|
1711
|
+
# @return [Types::GetDataProtectionPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1712
|
+
#
|
1713
|
+
# * {Types::GetDataProtectionPolicyResponse#log_group_identifier #log_group_identifier} => String
|
1714
|
+
# * {Types::GetDataProtectionPolicyResponse#policy_document #policy_document} => String
|
1715
|
+
# * {Types::GetDataProtectionPolicyResponse#last_updated_time #last_updated_time} => Integer
|
1716
|
+
#
|
1717
|
+
# @example Request syntax with placeholder values
|
1718
|
+
#
|
1719
|
+
# resp = client.get_data_protection_policy({
|
1720
|
+
# log_group_identifier: "LogGroupIdentifier", # required
|
1721
|
+
# })
|
1722
|
+
#
|
1723
|
+
# @example Response structure
|
1724
|
+
#
|
1725
|
+
# resp.log_group_identifier #=> String
|
1726
|
+
# resp.policy_document #=> String
|
1727
|
+
# resp.last_updated_time #=> Integer
|
1728
|
+
#
|
1729
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDataProtectionPolicy AWS API Documentation
|
1730
|
+
#
|
1731
|
+
# @overload get_data_protection_policy(params = {})
|
1732
|
+
# @param [Hash] params ({})
|
1733
|
+
def get_data_protection_policy(params = {}, options = {})
|
1734
|
+
req = build_request(:get_data_protection_policy, params)
|
1735
|
+
req.send_request(options)
|
1736
|
+
end
|
1737
|
+
|
1558
1738
|
# Lists log events from the specified log stream. You can list all of
|
1559
1739
|
# the log events or filter using a time range.
|
1560
1740
|
#
|
@@ -1564,21 +1744,45 @@ module Aws::CloudWatchLogs
|
|
1564
1744
|
# operation can return empty results while there are more log events
|
1565
1745
|
# available through the token.
|
1566
1746
|
#
|
1747
|
+
# If you are using CloudWatch cross-account observability, you can use
|
1748
|
+
# this operation in a monitoring account and view data from the linked
|
1749
|
+
# source accounts. For more information, see [CloudWatch cross-account
|
1750
|
+
# observability][1].
|
1751
|
+
#
|
1752
|
+
#
|
1753
|
+
#
|
1754
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
1755
|
+
#
|
1567
1756
|
# @option params [required, String] :log_group_name
|
1568
1757
|
# The name of the log group.
|
1569
1758
|
#
|
1759
|
+
# <note markdown="1"> If you specify values for both `logGroupName` and
|
1760
|
+
# `logGroupIdentifier`, the action returns an
|
1761
|
+
# `InvalidParameterException` error.
|
1762
|
+
#
|
1763
|
+
# </note>
|
1764
|
+
#
|
1765
|
+
# @option params [String] :log_group_identifier
|
1766
|
+
# Specify either the name or ARN of the log group to view events from.
|
1767
|
+
# If the log group is in a source account and you are using a monitoring
|
1768
|
+
# account, you must use the log group ARN.
|
1769
|
+
#
|
1770
|
+
# If you specify values for both `logGroupName` and
|
1771
|
+
# `logGroupIdentifier`, the action returns an
|
1772
|
+
# `InvalidParameterException` error.
|
1773
|
+
#
|
1570
1774
|
# @option params [required, String] :log_stream_name
|
1571
1775
|
# The name of the log stream.
|
1572
1776
|
#
|
1573
1777
|
# @option params [Integer] :start_time
|
1574
1778
|
# The start of the time range, expressed as the number of milliseconds
|
1575
|
-
# after Jan 1, 1970 00:00:00 UTC
|
1576
|
-
# time or later than this time are included. Events with a
|
1577
|
-
# earlier than this time are not included.
|
1779
|
+
# after `Jan 1, 1970 00:00:00 UTC`. Events with a timestamp equal to
|
1780
|
+
# this time or later than this time are included. Events with a
|
1781
|
+
# timestamp earlier than this time are not included.
|
1578
1782
|
#
|
1579
1783
|
# @option params [Integer] :end_time
|
1580
1784
|
# The end of the time range, expressed as the number of milliseconds
|
1581
|
-
# after Jan 1, 1970 00:00:00 UTC
|
1785
|
+
# after `Jan 1, 1970 00:00:00 UTC`. Events with a timestamp equal to or
|
1582
1786
|
# later than this time are not included.
|
1583
1787
|
#
|
1584
1788
|
# @option params [String] :next_token
|
@@ -1587,8 +1791,8 @@ module Aws::CloudWatchLogs
|
|
1587
1791
|
#
|
1588
1792
|
# @option params [Integer] :limit
|
1589
1793
|
# The maximum number of log events returned. If you don't specify a
|
1590
|
-
#
|
1591
|
-
# of 1 MB
|
1794
|
+
# limit, the default is as many log events as can fit in a response size
|
1795
|
+
# of 1 MB (up to 10,000 log events).
|
1592
1796
|
#
|
1593
1797
|
# @option params [Boolean] :start_from_head
|
1594
1798
|
# If the value is true, the earliest log events are returned first. If
|
@@ -1599,6 +1803,13 @@ module Aws::CloudWatchLogs
|
|
1599
1803
|
# `nextToken` in this operation, you must specify `true` for
|
1600
1804
|
# `startFromHead`.
|
1601
1805
|
#
|
1806
|
+
# @option params [Boolean] :unmask
|
1807
|
+
# Specify `true` to display the log event fields with all sensitive data
|
1808
|
+
# unmasked and visible. The default is `false`.
|
1809
|
+
#
|
1810
|
+
# To use this operation with this parameter, you must be signed into an
|
1811
|
+
# account with the `logs:Unmask` permission.
|
1812
|
+
#
|
1602
1813
|
# @return [Types::GetLogEventsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1603
1814
|
#
|
1604
1815
|
# * {Types::GetLogEventsResponse#events #events} => Array<Types::OutputLogEvent>
|
@@ -1611,12 +1822,14 @@ module Aws::CloudWatchLogs
|
|
1611
1822
|
#
|
1612
1823
|
# resp = client.get_log_events({
|
1613
1824
|
# log_group_name: "LogGroupName", # required
|
1825
|
+
# log_group_identifier: "LogGroupIdentifier",
|
1614
1826
|
# log_stream_name: "LogStreamName", # required
|
1615
1827
|
# start_time: 1,
|
1616
1828
|
# end_time: 1,
|
1617
1829
|
# next_token: "NextToken",
|
1618
1830
|
# limit: 1,
|
1619
1831
|
# start_from_head: false,
|
1832
|
+
# unmask: false,
|
1620
1833
|
# })
|
1621
1834
|
#
|
1622
1835
|
# @example Response structure
|
@@ -1638,11 +1851,11 @@ module Aws::CloudWatchLogs
|
|
1638
1851
|
end
|
1639
1852
|
|
1640
1853
|
# Returns a list of the fields that are included in log events in the
|
1641
|
-
# specified log group
|
1854
|
+
# specified log group. Includes the percentage of log events that
|
1642
1855
|
# contain each field. The search is limited to a time period that you
|
1643
1856
|
# specify.
|
1644
1857
|
#
|
1645
|
-
# In the results, fields that start with
|
1858
|
+
# In the results, fields that start with `@` are fields generated by
|
1646
1859
|
# CloudWatch Logs. For example, `@timestamp` is the timestamp of each
|
1647
1860
|
# log event. For more information about the fields that are generated by
|
1648
1861
|
# CloudWatch logs, see [Supported Logs and Discovered Fields][1].
|
@@ -1650,20 +1863,39 @@ module Aws::CloudWatchLogs
|
|
1650
1863
|
# The response results are sorted by the frequency percentage, starting
|
1651
1864
|
# with the highest percentage.
|
1652
1865
|
#
|
1866
|
+
# If you are using CloudWatch cross-account observability, you can use
|
1867
|
+
# this operation in a monitoring account and view data from the linked
|
1868
|
+
# source accounts. For more information, see [CloudWatch cross-account
|
1869
|
+
# observability][2].
|
1870
|
+
#
|
1653
1871
|
#
|
1654
1872
|
#
|
1655
1873
|
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html
|
1874
|
+
# [2]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
1656
1875
|
#
|
1657
1876
|
# @option params [required, String] :log_group_name
|
1658
1877
|
# The name of the log group to search.
|
1659
1878
|
#
|
1879
|
+
# If you specify values for both `logGroupName` and
|
1880
|
+
# `logGroupIdentifier`, the action returns an
|
1881
|
+
# `InvalidParameterException` error.
|
1882
|
+
#
|
1660
1883
|
# @option params [Integer] :time
|
1661
1884
|
# The time to set as the center of the query. If you specify `time`, the
|
1662
|
-
# 15 minutes before this time are queries. If you omit `time
|
1885
|
+
# 15 minutes before this time are queries. If you omit `time`, the 8
|
1663
1886
|
# minutes before and 8 minutes after this time are searched.
|
1664
1887
|
#
|
1665
|
-
# The `time` value is specified as epoch time, the number of
|
1666
|
-
# since January 1, 1970, 00:00:00 UTC
|
1888
|
+
# The `time` value is specified as epoch time, which is the number of
|
1889
|
+
# seconds since `January 1, 1970, 00:00:00 UTC`.
|
1890
|
+
#
|
1891
|
+
# @option params [String] :log_group_identifier
|
1892
|
+
# Specify either the name or ARN of the log group to view. If the log
|
1893
|
+
# group is in a source account and you are using a monitoring account,
|
1894
|
+
# you must specify the ARN.
|
1895
|
+
#
|
1896
|
+
# If you specify values for both `logGroupName` and
|
1897
|
+
# `logGroupIdentifier`, the action returns an
|
1898
|
+
# `InvalidParameterException` error.
|
1667
1899
|
#
|
1668
1900
|
# @return [Types::GetLogGroupFieldsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1669
1901
|
#
|
@@ -1674,6 +1906,7 @@ module Aws::CloudWatchLogs
|
|
1674
1906
|
# resp = client.get_log_group_fields({
|
1675
1907
|
# log_group_name: "LogGroupName", # required
|
1676
1908
|
# time: 1,
|
1909
|
+
# log_group_identifier: "LogGroupIdentifier",
|
1677
1910
|
# })
|
1678
1911
|
#
|
1679
1912
|
# @example Response structure
|
@@ -1705,6 +1938,13 @@ module Aws::CloudWatchLogs
|
|
1705
1938
|
# event is the value to use as `logRecordPointer` to retrieve that
|
1706
1939
|
# complete log event record.
|
1707
1940
|
#
|
1941
|
+
# @option params [Boolean] :unmask
|
1942
|
+
# Specify `true` to display the log event fields with all sensitive data
|
1943
|
+
# unmasked and visible. The default is `false`.
|
1944
|
+
#
|
1945
|
+
# To use this operation with this parameter, you must be signed into an
|
1946
|
+
# account with the `logs:Unmask` permission.
|
1947
|
+
#
|
1708
1948
|
# @return [Types::GetLogRecordResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1709
1949
|
#
|
1710
1950
|
# * {Types::GetLogRecordResponse#log_record #log_record} => Hash<String,String>
|
@@ -1713,6 +1953,7 @@ module Aws::CloudWatchLogs
|
|
1713
1953
|
#
|
1714
1954
|
# resp = client.get_log_record({
|
1715
1955
|
# log_record_pointer: "LogRecordPointer", # required
|
1956
|
+
# unmask: false,
|
1716
1957
|
# })
|
1717
1958
|
#
|
1718
1959
|
# @example Response structure
|
@@ -1736,18 +1977,24 @@ module Aws::CloudWatchLogs
|
|
1736
1977
|
# the value of `@ptr` in a [GetLogRecord][1] operation to get the full
|
1737
1978
|
# log record.
|
1738
1979
|
#
|
1739
|
-
# `GetQueryResults` does not start a query
|
1740
|
-
#
|
1980
|
+
# `GetQueryResults` does not start running a query. To run a query, use
|
1981
|
+
# [StartQuery][2].
|
1741
1982
|
#
|
1742
1983
|
# If the value of the `Status` field in the output is `Running`, this
|
1743
1984
|
# operation returns only partial results. If you see a value of
|
1744
1985
|
# `Scheduled` or `Running` for the status, you can retry the operation
|
1745
1986
|
# later to see the final results.
|
1746
1987
|
#
|
1988
|
+
# If you are using CloudWatch cross-account observability, you can use
|
1989
|
+
# this operation in a monitoring account to start queries in linked
|
1990
|
+
# source accounts. For more information, see [CloudWatch cross-account
|
1991
|
+
# observability][3].
|
1992
|
+
#
|
1747
1993
|
#
|
1748
1994
|
#
|
1749
1995
|
# [1]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html
|
1750
1996
|
# [2]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html
|
1997
|
+
# [3]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
1751
1998
|
#
|
1752
1999
|
# @option params [required, String] :query_id
|
1753
2000
|
# The ID number of the query.
|
@@ -1863,12 +2110,106 @@ module Aws::CloudWatchLogs
|
|
1863
2110
|
req.send_request(options)
|
1864
2111
|
end
|
1865
2112
|
|
2113
|
+
# Creates a data protection policy for the specified log group. A data
|
2114
|
+
# protection policy can help safeguard sensitive data that's ingested
|
2115
|
+
# by the log group by auditing and masking the sensitive log data.
|
2116
|
+
#
|
2117
|
+
# Sensitive data is detected and masked when it is ingested into the log
|
2118
|
+
# group. When you set a data protection policy, log events ingested into
|
2119
|
+
# the log group before that time are not masked.
|
2120
|
+
#
|
2121
|
+
# By default, when a user views a log event that includes masked data,
|
2122
|
+
# the sensitive data is replaced by asterisks. A user who has the
|
2123
|
+
# `logs:Unmask` permission can use a [GetLogEvents][1] or
|
2124
|
+
# [FilterLogEvents][2] operation with the `unmask` parameter set to
|
2125
|
+
# `true` to view the unmasked log events. Users with the `logs:Unmask`
|
2126
|
+
# can also view unmasked data in the CloudWatch Logs console by running
|
2127
|
+
# a CloudWatch Logs Insights query with the `unmask` query command.
|
2128
|
+
#
|
2129
|
+
# For more information, including a list of types of data that can be
|
2130
|
+
# audited and masked, see [Protect sensitive log data with masking][3].
|
2131
|
+
#
|
2132
|
+
#
|
2133
|
+
#
|
2134
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html
|
2135
|
+
# [2]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html
|
2136
|
+
# [3]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html
|
2137
|
+
#
|
2138
|
+
# @option params [required, String] :log_group_identifier
|
2139
|
+
# Specify either the log group name or log group ARN.
|
2140
|
+
#
|
2141
|
+
# @option params [required, String] :policy_document
|
2142
|
+
# Specify the data protection policy, in JSON.
|
2143
|
+
#
|
2144
|
+
# This policy must include two JSON blocks:
|
2145
|
+
#
|
2146
|
+
# * The first block must include both a `DataIdentifer` array and an
|
2147
|
+
# `Operation` property with an `Audit` action. The `DataIdentifer`
|
2148
|
+
# array lists the types of sensitive data that you want to mask. For
|
2149
|
+
# more information about the available options, see [Types of data
|
2150
|
+
# that you can mask][1].
|
2151
|
+
#
|
2152
|
+
# The `Operation` property with an `Audit` action is required to find
|
2153
|
+
# the sensitive data terms. This `Audit` action must contain a
|
2154
|
+
# `FindingsDestination` object. You can optionally use that
|
2155
|
+
# `FindingsDestination` object to list one or more destinations to
|
2156
|
+
# send audit findings to. If you specify destinations such as log
|
2157
|
+
# groups, Kinesis Data Firehose streams, and S3 buckets, they must
|
2158
|
+
# already exist.
|
2159
|
+
#
|
2160
|
+
# * The second block must include both a `DataIdentifer` array and an
|
2161
|
+
# `Operation` property with an `Deidentify` action. The
|
2162
|
+
# `DataIdentifer` array must exactly match the `DataIdentifer` array
|
2163
|
+
# in the first block of the policy.
|
2164
|
+
#
|
2165
|
+
# The `Operation` property with the `Deidentify` action is what
|
2166
|
+
# actually masks the data, and it must contain the ` "MaskConfig":
|
2167
|
+
# \{\}` object. The ` "MaskConfig": \{\}` object must be empty.
|
2168
|
+
#
|
2169
|
+
# For an example data protection policy, see the **Examples** section on
|
2170
|
+
# this page.
|
2171
|
+
#
|
2172
|
+
# The contents of two `DataIdentifer` arrays must match exactly.
|
2173
|
+
#
|
2174
|
+
#
|
2175
|
+
#
|
2176
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html
|
2177
|
+
#
|
2178
|
+
# @return [Types::PutDataProtectionPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
2179
|
+
#
|
2180
|
+
# * {Types::PutDataProtectionPolicyResponse#log_group_identifier #log_group_identifier} => String
|
2181
|
+
# * {Types::PutDataProtectionPolicyResponse#policy_document #policy_document} => String
|
2182
|
+
# * {Types::PutDataProtectionPolicyResponse#last_updated_time #last_updated_time} => Integer
|
2183
|
+
#
|
2184
|
+
# @example Request syntax with placeholder values
|
2185
|
+
#
|
2186
|
+
# resp = client.put_data_protection_policy({
|
2187
|
+
# log_group_identifier: "LogGroupIdentifier", # required
|
2188
|
+
# policy_document: "DataProtectionPolicyDocument", # required
|
2189
|
+
# })
|
2190
|
+
#
|
2191
|
+
# @example Response structure
|
2192
|
+
#
|
2193
|
+
# resp.log_group_identifier #=> String
|
2194
|
+
# resp.policy_document #=> String
|
2195
|
+
# resp.last_updated_time #=> Integer
|
2196
|
+
#
|
2197
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDataProtectionPolicy AWS API Documentation
|
2198
|
+
#
|
2199
|
+
# @overload put_data_protection_policy(params = {})
|
2200
|
+
# @param [Hash] params ({})
|
2201
|
+
def put_data_protection_policy(params = {}, options = {})
|
2202
|
+
req = build_request(:put_data_protection_policy, params)
|
2203
|
+
req.send_request(options)
|
2204
|
+
end
|
2205
|
+
|
1866
2206
|
# Creates or updates a destination. This operation is used only to
|
1867
2207
|
# create destinations for cross-account subscriptions.
|
1868
2208
|
#
|
1869
2209
|
# A destination encapsulates a physical resource (such as an Amazon
|
1870
|
-
# Kinesis stream)
|
1871
|
-
# log events for a different account, ingested using
|
2210
|
+
# Kinesis stream). With a destination, you can subscribe to a real-time
|
2211
|
+
# stream of log events for a different account, ingested using
|
2212
|
+
# [PutLogEvents][1].
|
1872
2213
|
#
|
1873
2214
|
# Through an access policy, a destination controls what is written to
|
1874
2215
|
# it. By default, `PutDestination` does not set any access policy with
|
@@ -2017,26 +2358,27 @@ module Aws::CloudWatchLogs
|
|
2017
2358
|
# * None of the log events in the batch can be more than 2 hours in the
|
2018
2359
|
# future.
|
2019
2360
|
#
|
2020
|
-
# * None of the log events in the batch can be
|
2021
|
-
#
|
2361
|
+
# * None of the log events in the batch can be more than 14 days in the
|
2362
|
+
# past. Also, none of the log events can be from earlier than the
|
2363
|
+
# retention period of the log group.
|
2022
2364
|
#
|
2023
2365
|
# * The log events in the batch must be in chronological order by their
|
2024
|
-
# timestamp. The timestamp is the time the event occurred,
|
2025
|
-
# as the number of milliseconds after Jan 1, 1970 00:00:00
|
2026
|
-
# Amazon Web Services Tools for PowerShell and the Amazon
|
2027
|
-
# SDK for .NET, the timestamp is specified in .NET
|
2028
|
-
# yyyy-mm-ddThh:mm:ss
|
2366
|
+
# timestamp. The timestamp is the time that the event occurred,
|
2367
|
+
# expressed as the number of milliseconds after `Jan 1, 1970 00:00:00
|
2368
|
+
# UTC`. (In Amazon Web Services Tools for PowerShell and the Amazon
|
2369
|
+
# Web Services SDK for .NET, the timestamp is specified in .NET
|
2370
|
+
# format: `yyyy-mm-ddThh:mm:ss`. For example, `2017-09-15T13:45:30`.)
|
2029
2371
|
#
|
2030
2372
|
# * A batch of log events in a single request cannot span more than 24
|
2031
2373
|
# hours. Otherwise, the operation fails.
|
2032
2374
|
#
|
2033
2375
|
# * The maximum number of log events in a batch is 10,000.
|
2034
2376
|
#
|
2035
|
-
# * There is a quota of
|
2036
|
-
# requests are throttled. This quota can't be changed.
|
2377
|
+
# * There is a quota of five requests per second per log stream.
|
2378
|
+
# Additional requests are throttled. This quota can't be changed.
|
2037
2379
|
#
|
2038
2380
|
# If a call to `PutLogEvents` returns "UnrecognizedClientException"
|
2039
|
-
# the most likely cause is
|
2381
|
+
# the most likely cause is a non-valid Amazon Web Services access key ID
|
2040
2382
|
# or secret key.
|
2041
2383
|
#
|
2042
2384
|
# @option params [required, String] :log_group_name
|
@@ -2096,7 +2438,7 @@ module Aws::CloudWatchLogs
|
|
2096
2438
|
end
|
2097
2439
|
|
2098
2440
|
# Creates or updates a metric filter and associates it with the
|
2099
|
-
# specified log group.
|
2441
|
+
# specified log group. With metric filters, you can configure rules to
|
2100
2442
|
# extract metric data from log events ingested through
|
2101
2443
|
# [PutLogEvents][1].
|
2102
2444
|
#
|
@@ -2112,9 +2454,9 @@ module Aws::CloudWatchLogs
|
|
2112
2454
|
# different value found for a dimension is treated as a separate metric
|
2113
2455
|
# and accrues charges as a separate custom metric.
|
2114
2456
|
#
|
2115
|
-
#
|
2116
|
-
#
|
2117
|
-
#
|
2457
|
+
# CloudWatch Logs disables a metric filter if it generates 1,000
|
2458
|
+
# different name/value pairs for your specified dimensions within a
|
2459
|
+
# certain amount of time. This helps to prevent accidental high charges.
|
2118
2460
|
#
|
2119
2461
|
# You can also set up a billing alarm to alert you if your charges are
|
2120
2462
|
# higher than expected. For more information, see [ Creating a Billing
|
@@ -2177,8 +2519,8 @@ module Aws::CloudWatchLogs
|
|
2177
2519
|
# request. The values of `name`, `queryString`, and `logGroupNames` are
|
2178
2520
|
# changed to the values that you specify in your update operation. No
|
2179
2521
|
# current values are retained from the current query definition. For
|
2180
|
-
# example,
|
2181
|
-
# groups
|
2522
|
+
# example, imagine updating a current query definition that includes log
|
2523
|
+
# groups. If you don't specify the `logGroupNames` parameter in your
|
2182
2524
|
# update operation, the query definition changes to contain no log
|
2183
2525
|
# groups.
|
2184
2526
|
#
|
@@ -2190,10 +2532,10 @@ module Aws::CloudWatchLogs
|
|
2190
2532
|
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html
|
2191
2533
|
#
|
2192
2534
|
# @option params [required, String] :name
|
2193
|
-
# A name for the query definition. If you are saving
|
2194
|
-
# definitions, we recommend that you name them
|
2195
|
-
#
|
2196
|
-
#
|
2535
|
+
# A name for the query definition. If you are saving numerous query
|
2536
|
+
# definitions, we recommend that you name them. This way, you can find
|
2537
|
+
# the ones you want by using the first part of the name as a filter in
|
2538
|
+
# the `queryDefinitionNamePrefix` parameter of
|
2197
2539
|
# [DescribeQueryDefinitions][1].
|
2198
2540
|
#
|
2199
2541
|
#
|
@@ -2278,8 +2620,8 @@ module Aws::CloudWatchLogs
|
|
2278
2620
|
#
|
2279
2621
|
# In the example resource policy, you would replace the value of
|
2280
2622
|
# `SourceArn` with the resource making the call from Route 53 to
|
2281
|
-
# CloudWatch Logs
|
2282
|
-
# Amazon Web Services account ID making that call.
|
2623
|
+
# CloudWatch Logs. You would also replace the value of `SourceAccount`
|
2624
|
+
# with the Amazon Web Services account ID making that call.
|
2283
2625
|
#
|
2284
2626
|
#
|
2285
2627
|
#
|
@@ -2321,19 +2663,35 @@ module Aws::CloudWatchLogs
|
|
2321
2663
|
req.send_request(options)
|
2322
2664
|
end
|
2323
2665
|
|
2324
|
-
# Sets the retention of the specified log group.
|
2325
|
-
#
|
2666
|
+
# Sets the retention of the specified log group. With a retention
|
2667
|
+
# policy, you can configure the number of days for which to retain log
|
2326
2668
|
# events in the specified log group.
|
2327
2669
|
#
|
2670
|
+
# <note markdown="1"> CloudWatch Logs doesn’t immediately delete log events when they reach
|
2671
|
+
# their retention setting. It typically takes up to 72 hours after that
|
2672
|
+
# before log events are deleted, but in rare situations might take
|
2673
|
+
# longer.
|
2674
|
+
#
|
2675
|
+
# To illustrate, imagine that you change a log group to have a longer
|
2676
|
+
# retention setting when it contains log events that are past the
|
2677
|
+
# expiration date, but haven’t been deleted. Those log events will take
|
2678
|
+
# up to 72 hours to be deleted after the new retention date is reached.
|
2679
|
+
# To make sure that log data is deleted permanently, keep a log group at
|
2680
|
+
# its lower retention setting until 72 hours after the previous
|
2681
|
+
# retention period ends. Alternatively, wait to change the retention
|
2682
|
+
# setting until you confirm that the earlier log events are deleted.
|
2683
|
+
#
|
2684
|
+
# </note>
|
2685
|
+
#
|
2328
2686
|
# @option params [required, String] :log_group_name
|
2329
2687
|
# The name of the log group.
|
2330
2688
|
#
|
2331
2689
|
# @option params [required, Integer] :retention_in_days
|
2332
2690
|
# The number of days to retain the log events in the specified log
|
2333
2691
|
# group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180,
|
2334
|
-
# 365, 400, 545, 731, 1827, and 3653.
|
2692
|
+
# 365, 400, 545, 731, 1827, 2192, 2557, 2922, 3288, and 3653.
|
2335
2693
|
#
|
2336
|
-
# To set a log group
|
2694
|
+
# To set a log group so that its log events do not expire, use
|
2337
2695
|
# [DeleteRetentionPolicy][1].
|
2338
2696
|
#
|
2339
2697
|
#
|
@@ -2359,22 +2717,22 @@ module Aws::CloudWatchLogs
|
|
2359
2717
|
end
|
2360
2718
|
|
2361
2719
|
# Creates or updates a subscription filter and associates it with the
|
2362
|
-
# specified log group.
|
2720
|
+
# specified log group. With subscription filters, you can subscribe to a
|
2363
2721
|
# real-time stream of log events ingested through [PutLogEvents][1] and
|
2364
2722
|
# have them delivered to a specific destination. When log events are
|
2365
2723
|
# sent to the receiving service, they are Base64 encoded and compressed
|
2366
|
-
# with the
|
2724
|
+
# with the GZIP format.
|
2367
2725
|
#
|
2368
2726
|
# The following destinations are supported for subscription filters:
|
2369
2727
|
#
|
2370
|
-
# * An Amazon Kinesis stream belonging to the same account as the
|
2728
|
+
# * An Amazon Kinesis data stream belonging to the same account as the
|
2371
2729
|
# subscription filter, for same-account delivery.
|
2372
2730
|
#
|
2373
2731
|
# * A logical destination that belongs to a different account, for
|
2374
2732
|
# cross-account delivery.
|
2375
2733
|
#
|
2376
|
-
# * An Amazon Kinesis Firehose delivery stream that belongs to the
|
2377
|
-
# account as the subscription filter, for same-account delivery.
|
2734
|
+
# * An Amazon Kinesis Data Firehose delivery stream that belongs to the
|
2735
|
+
# same account as the subscription filter, for same-account delivery.
|
2378
2736
|
#
|
2379
2737
|
# * An Lambda function that belongs to the same account as the
|
2380
2738
|
# subscription filter, for same-account delivery.
|
@@ -2416,12 +2774,12 @@ module Aws::CloudWatchLogs
|
|
2416
2774
|
# * A logical destination (specified using an ARN) belonging to a
|
2417
2775
|
# different account, for cross-account delivery.
|
2418
2776
|
#
|
2419
|
-
# If you
|
2420
|
-
# must have an IAM policy associated with it
|
2421
|
-
# send logs to the destination. For more
|
2422
|
-
# [PutDestinationPolicy][1].
|
2777
|
+
# If you're setting up a cross-account subscription, the destination
|
2778
|
+
# must have an IAM policy associated with it. The IAM policy must
|
2779
|
+
# allow the sender to send logs to the destination. For more
|
2780
|
+
# information, see [PutDestinationPolicy][1].
|
2423
2781
|
#
|
2424
|
-
# *
|
2782
|
+
# * A Kinesis Data Firehose delivery stream belonging to the same
|
2425
2783
|
# account as the subscription filter, for same-account delivery.
|
2426
2784
|
#
|
2427
2785
|
# * A Lambda function belonging to the same account as the subscription
|
@@ -2441,7 +2799,7 @@ module Aws::CloudWatchLogs
|
|
2441
2799
|
# The method used to distribute log data to the destination. By default,
|
2442
2800
|
# log data is grouped by log stream, but the grouping can be set to
|
2443
2801
|
# random for a more even distribution. This property is only applicable
|
2444
|
-
# when the destination is an Amazon Kinesis stream.
|
2802
|
+
# when the destination is an Amazon Kinesis data stream.
|
2445
2803
|
#
|
2446
2804
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2447
2805
|
#
|
@@ -2471,36 +2829,63 @@ module Aws::CloudWatchLogs
|
|
2471
2829
|
#
|
2472
2830
|
# For more information, see [CloudWatch Logs Insights Query Syntax][1].
|
2473
2831
|
#
|
2474
|
-
# Queries time out after 15 minutes of
|
2832
|
+
# Queries time out after 15 minutes of runtime. If your queries are
|
2475
2833
|
# timing out, reduce the time range being searched or partition your
|
2476
2834
|
# query into a number of queries.
|
2477
2835
|
#
|
2836
|
+
# If you are using CloudWatch cross-account observability, you can use
|
2837
|
+
# this operation in a monitoring account to start a query in a linked
|
2838
|
+
# source account. For more information, see [CloudWatch cross-account
|
2839
|
+
# observability][2]. For a cross-account `StartQuery` operation, the
|
2840
|
+
# query definition must be defined in the monitoring account.
|
2841
|
+
#
|
2842
|
+
# You can have up to 20 concurrent CloudWatch Logs insights queries,
|
2843
|
+
# including queries that have been added to dashboards.
|
2844
|
+
#
|
2478
2845
|
#
|
2479
2846
|
#
|
2480
2847
|
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html
|
2848
|
+
# [2]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
2481
2849
|
#
|
2482
2850
|
# @option params [String] :log_group_name
|
2483
2851
|
# The log group on which to perform the query.
|
2484
2852
|
#
|
2485
|
-
# A `StartQuery` operation must include
|
2486
|
-
# `logGroupName`
|
2853
|
+
# <note markdown="1"> A `StartQuery` operation must include exactly one of the following
|
2854
|
+
# parameters: `logGroupName`, `logGroupNames` or `logGroupIdentifiers`.
|
2855
|
+
#
|
2856
|
+
# </note>
|
2487
2857
|
#
|
2488
2858
|
# @option params [Array<String>] :log_group_names
|
2489
|
-
# The list of log groups to be queried. You can include up to
|
2859
|
+
# The list of log groups to be queried. You can include up to 50 log
|
2490
2860
|
# groups.
|
2491
2861
|
#
|
2492
|
-
# A `StartQuery` operation must include
|
2493
|
-
# `logGroupName`
|
2862
|
+
# <note markdown="1"> A `StartQuery` operation must include exactly one of the following
|
2863
|
+
# parameters: `logGroupName`, `logGroupNames` or `logGroupIdentifiers`.
|
2864
|
+
#
|
2865
|
+
# </note>
|
2866
|
+
#
|
2867
|
+
# @option params [Array<String>] :log_group_identifiers
|
2868
|
+
# The list of log groups to query. You can include up to 50 log groups.
|
2869
|
+
#
|
2870
|
+
# You can specify them by the log group name or ARN. If a log group that
|
2871
|
+
# you're querying is in a source account and you're using a monitoring
|
2872
|
+
# account, you must specify the ARN of the log group here. The query
|
2873
|
+
# definition must also be defined in the monitoring account.
|
2874
|
+
#
|
2875
|
+
# If you specify an ARN, the ARN can't end with an asterisk (*).
|
2876
|
+
#
|
2877
|
+
# A `StartQuery` operation must include exactly one of the following
|
2878
|
+
# parameters: `logGroupName`, `logGroupNames` or `logGroupIdentifiers`.
|
2494
2879
|
#
|
2495
2880
|
# @option params [required, Integer] :start_time
|
2496
2881
|
# The beginning of the time range to query. The range is inclusive, so
|
2497
2882
|
# the specified start time is included in the query. Specified as epoch
|
2498
|
-
# time, the number of seconds since January 1, 1970, 00:00:00 UTC
|
2883
|
+
# time, the number of seconds since `January 1, 1970, 00:00:00 UTC`.
|
2499
2884
|
#
|
2500
2885
|
# @option params [required, Integer] :end_time
|
2501
2886
|
# The end of the time range to query. The range is inclusive, so the
|
2502
2887
|
# specified end time is included in the query. Specified as epoch time,
|
2503
|
-
# the number of seconds since January 1, 1970, 00:00:00 UTC
|
2888
|
+
# the number of seconds since `January 1, 1970, 00:00:00 UTC`.
|
2504
2889
|
#
|
2505
2890
|
# @option params [required, String] :query_string
|
2506
2891
|
# The query string to use. For more information, see [CloudWatch Logs
|
@@ -2524,6 +2909,7 @@ module Aws::CloudWatchLogs
|
|
2524
2909
|
# resp = client.start_query({
|
2525
2910
|
# log_group_name: "LogGroupName",
|
2526
2911
|
# log_group_names: ["LogGroupName"],
|
2912
|
+
# log_group_identifiers: ["LogGroupIdentifier"],
|
2527
2913
|
# start_time: 1, # required
|
2528
2914
|
# end_time: 1, # required
|
2529
2915
|
# query_string: "QueryString", # required
|
@@ -2819,7 +3205,7 @@ module Aws::CloudWatchLogs
|
|
2819
3205
|
params: params,
|
2820
3206
|
config: config)
|
2821
3207
|
context[:gem_name] = 'aws-sdk-cloudwatchlogs'
|
2822
|
-
context[:gem_version] = '1.
|
3208
|
+
context[:gem_version] = '1.57.0'
|
2823
3209
|
Seahorse::Client::Request.new(handlers, context)
|
2824
3210
|
end
|
2825
3211
|
|