aws-sdk-cloudwatchlogs 1.119.0 → 1.121.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.
@@ -648,7 +648,7 @@ module Aws::CloudWatchLogs
648
648
  # from Amazon Web Services services.][1]
649
649
  #
650
650
  # A delivery destination can represent a log group in CloudWatch Logs,
651
- # an Amazon S3 bucket, or a delivery stream in Firehose.
651
+ # an Amazon S3 bucket, a delivery stream in Firehose, or X-Ray.
652
652
  #
653
653
  # To configure logs delivery between a supported Amazon Web Services
654
654
  # service and a destination, you must do the following:
@@ -740,7 +740,7 @@ module Aws::CloudWatchLogs
740
740
  # resp.delivery.arn #=> String
741
741
  # resp.delivery.delivery_source_name #=> String
742
742
  # resp.delivery.delivery_destination_arn #=> String
743
- # resp.delivery.delivery_destination_type #=> String, one of "S3", "CWL", "FH"
743
+ # resp.delivery.delivery_destination_type #=> String, one of "S3", "CWL", "FH", "XRAY"
744
744
  # resp.delivery.record_fields #=> Array
745
745
  # resp.delivery.record_fields[0] #=> String
746
746
  # resp.delivery.field_delimiter #=> String
@@ -1186,7 +1186,7 @@ module Aws::CloudWatchLogs
1186
1186
  #
1187
1187
  # resp = client.delete_account_policy({
1188
1188
  # policy_name: "PolicyName", # required
1189
- # policy_type: "DATA_PROTECTION_POLICY", # required, accepts DATA_PROTECTION_POLICY, SUBSCRIPTION_FILTER_POLICY, FIELD_INDEX_POLICY, TRANSFORMER_POLICY
1189
+ # policy_type: "DATA_PROTECTION_POLICY", # required, accepts DATA_PROTECTION_POLICY, SUBSCRIPTION_FILTER_POLICY, FIELD_INDEX_POLICY, TRANSFORMER_POLICY, METRIC_EXTRACTION_POLICY
1190
1190
  # })
1191
1191
  #
1192
1192
  # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteAccountPolicy AWS API Documentation
@@ -1273,7 +1273,7 @@ module Aws::CloudWatchLogs
1273
1273
  #
1274
1274
  # @option params [required, String] :name
1275
1275
  # The name of the delivery destination that you want to delete. You can
1276
- # find a list of delivery destionation names by using the
1276
+ # find a list of delivery destination names by using the
1277
1277
  # [DescribeDeliveryDestinations][1] operation.
1278
1278
  #
1279
1279
  #
@@ -1610,12 +1610,22 @@ module Aws::CloudWatchLogs
1610
1610
  # @option params [String] :policy_name
1611
1611
  # The name of the policy to be revoked. This parameter is required.
1612
1612
  #
1613
+ # @option params [String] :resource_arn
1614
+ # The ARN of the CloudWatch Logs resource for which the resource policy
1615
+ # needs to be deleted
1616
+ #
1617
+ # @option params [String] :expected_revision_id
1618
+ # The expected revision ID of the resource policy. Required when
1619
+ # deleting a resource-scoped policy to prevent concurrent modifications.
1620
+ #
1613
1621
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1614
1622
  #
1615
1623
  # @example Request syntax with placeholder values
1616
1624
  #
1617
1625
  # resp = client.delete_resource_policy({
1618
1626
  # policy_name: "PolicyName",
1627
+ # resource_arn: "Arn",
1628
+ # expected_revision_id: "ExpectedRevisionId",
1619
1629
  # })
1620
1630
  #
1621
1631
  # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy AWS API Documentation
@@ -1762,7 +1772,7 @@ module Aws::CloudWatchLogs
1762
1772
  # @example Request syntax with placeholder values
1763
1773
  #
1764
1774
  # resp = client.describe_account_policies({
1765
- # policy_type: "DATA_PROTECTION_POLICY", # required, accepts DATA_PROTECTION_POLICY, SUBSCRIPTION_FILTER_POLICY, FIELD_INDEX_POLICY, TRANSFORMER_POLICY
1775
+ # policy_type: "DATA_PROTECTION_POLICY", # required, accepts DATA_PROTECTION_POLICY, SUBSCRIPTION_FILTER_POLICY, FIELD_INDEX_POLICY, TRANSFORMER_POLICY, METRIC_EXTRACTION_POLICY
1766
1776
  # policy_name: "PolicyName",
1767
1777
  # account_identifiers: ["AccountId"],
1768
1778
  # next_token: "NextToken",
@@ -1774,7 +1784,7 @@ module Aws::CloudWatchLogs
1774
1784
  # resp.account_policies[0].policy_name #=> String
1775
1785
  # resp.account_policies[0].policy_document #=> String
1776
1786
  # resp.account_policies[0].last_updated_time #=> Integer
1777
- # resp.account_policies[0].policy_type #=> String, one of "DATA_PROTECTION_POLICY", "SUBSCRIPTION_FILTER_POLICY", "FIELD_INDEX_POLICY", "TRANSFORMER_POLICY"
1787
+ # resp.account_policies[0].policy_type #=> String, one of "DATA_PROTECTION_POLICY", "SUBSCRIPTION_FILTER_POLICY", "FIELD_INDEX_POLICY", "TRANSFORMER_POLICY", "METRIC_EXTRACTION_POLICY"
1778
1788
  # resp.account_policies[0].scope #=> String, one of "ALL"
1779
1789
  # resp.account_policies[0].selection_criteria #=> String
1780
1790
  # resp.account_policies[0].account_id #=> String
@@ -1839,7 +1849,7 @@ module Aws::CloudWatchLogs
1839
1849
  # service: "Service",
1840
1850
  # log_types: ["LogType"],
1841
1851
  # resource_types: ["ResourceType"],
1842
- # delivery_destination_types: ["S3"], # accepts S3, CWL, FH
1852
+ # delivery_destination_types: ["S3"], # accepts S3, CWL, FH, XRAY
1843
1853
  # next_token: "NextToken",
1844
1854
  # limit: 1,
1845
1855
  # })
@@ -1850,7 +1860,7 @@ module Aws::CloudWatchLogs
1850
1860
  # resp.configuration_templates[0].service #=> String
1851
1861
  # resp.configuration_templates[0].log_type #=> String
1852
1862
  # resp.configuration_templates[0].resource_type #=> String
1853
- # resp.configuration_templates[0].delivery_destination_type #=> String, one of "S3", "CWL", "FH"
1863
+ # resp.configuration_templates[0].delivery_destination_type #=> String, one of "S3", "CWL", "FH", "XRAY"
1854
1864
  # resp.configuration_templates[0].default_delivery_config_values.record_fields #=> Array
1855
1865
  # resp.configuration_templates[0].default_delivery_config_values.record_fields[0] #=> String
1856
1866
  # resp.configuration_templates[0].default_delivery_config_values.field_delimiter #=> String
@@ -1885,9 +1895,10 @@ module Aws::CloudWatchLogs
1885
1895
  #
1886
1896
  # A delivery source represents an Amazon Web Services resource that
1887
1897
  # sends logs to an logs delivery destination. The destination can be
1888
- # CloudWatch Logs, Amazon S3, or Firehose. Only some Amazon Web Services
1889
- # services support being configured as a delivery source. These services
1890
- # are listed in [Enable logging from Amazon Web Services services.][3]
1898
+ # CloudWatch Logs, Amazon S3, Firehose or X-Ray. Only some Amazon Web
1899
+ # Services services support being configured as a delivery source. These
1900
+ # services are listed in [Enable logging from Amazon Web Services
1901
+ # services.][3]
1891
1902
  #
1892
1903
  #
1893
1904
  #
@@ -1924,7 +1935,7 @@ module Aws::CloudWatchLogs
1924
1935
  # resp.deliveries[0].arn #=> String
1925
1936
  # resp.deliveries[0].delivery_source_name #=> String
1926
1937
  # resp.deliveries[0].delivery_destination_arn #=> String
1927
- # resp.deliveries[0].delivery_destination_type #=> String, one of "S3", "CWL", "FH"
1938
+ # resp.deliveries[0].delivery_destination_type #=> String, one of "S3", "CWL", "FH", "XRAY"
1928
1939
  # resp.deliveries[0].record_fields #=> Array
1929
1940
  # resp.deliveries[0].record_fields[0] #=> String
1930
1941
  # resp.deliveries[0].field_delimiter #=> String
@@ -1973,7 +1984,7 @@ module Aws::CloudWatchLogs
1973
1984
  # resp.delivery_destinations #=> Array
1974
1985
  # resp.delivery_destinations[0].name #=> String
1975
1986
  # resp.delivery_destinations[0].arn #=> String
1976
- # resp.delivery_destinations[0].delivery_destination_type #=> String, one of "S3", "CWL", "FH"
1987
+ # resp.delivery_destinations[0].delivery_destination_type #=> String, one of "S3", "CWL", "FH", "XRAY"
1977
1988
  # resp.delivery_destinations[0].output_format #=> String, one of "json", "plain", "w3c", "raw", "parquet"
1978
1989
  # resp.delivery_destinations[0].delivery_destination_configuration.destination_resource_arn #=> String
1979
1990
  # resp.delivery_destinations[0].tags #=> Hash
@@ -2285,9 +2296,10 @@ module Aws::CloudWatchLogs
2285
2296
  # @option params [String] :log_group_name_pattern
2286
2297
  # If you specify a string for this parameter, the operation returns only
2287
2298
  # log groups that have names that match the string based on a
2288
- # case-sensitive substring search. For example, if you specify `Foo`,
2289
- # log groups named `FooBar`, `aws/Foo`, and `GroupFoo` would match, but
2290
- # `foo`, `F/o/o` and `Froo` would not match.
2299
+ # case-sensitive substring search. For example, if you specify
2300
+ # `DataLogs`, log groups named `DataLogs`, `aws/DataLogs`, and
2301
+ # `GroupDataLogs` would match, but `datalogs`, `Data/log/s` and
2302
+ # `Groupdata` would not match.
2291
2303
  #
2292
2304
  # If you specify `logGroupNamePattern` in your request, then only `arn`,
2293
2305
  # `creationTime`, and `logGroupName` are included in the response.
@@ -2720,6 +2732,14 @@ module Aws::CloudWatchLogs
2720
2732
  # The maximum number of resource policies to be displayed with one call
2721
2733
  # of this API.
2722
2734
  #
2735
+ # @option params [String] :resource_arn
2736
+ # The ARN of the CloudWatch Logs resource for which to query the
2737
+ # resource policy.
2738
+ #
2739
+ # @option params [String] :policy_scope
2740
+ # Specifies the scope of the resource policy. Valid values are `ACCOUNT`
2741
+ # or `RESOURCE`. When not specified, defaults to `ACCOUNT`.
2742
+ #
2723
2743
  # @return [Types::DescribeResourcePoliciesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2724
2744
  #
2725
2745
  # * {Types::DescribeResourcePoliciesResponse#resource_policies #resource_policies} => Array<Types::ResourcePolicy>
@@ -2730,6 +2750,8 @@ module Aws::CloudWatchLogs
2730
2750
  # resp = client.describe_resource_policies({
2731
2751
  # next_token: "NextToken",
2732
2752
  # limit: 1,
2753
+ # resource_arn: "Arn",
2754
+ # policy_scope: "ACCOUNT", # accepts ACCOUNT, RESOURCE
2733
2755
  # })
2734
2756
  #
2735
2757
  # @example Response structure
@@ -2738,6 +2760,9 @@ module Aws::CloudWatchLogs
2738
2760
  # resp.resource_policies[0].policy_name #=> String
2739
2761
  # resp.resource_policies[0].policy_document #=> String
2740
2762
  # resp.resource_policies[0].last_updated_time #=> Integer
2763
+ # resp.resource_policies[0].policy_scope #=> String, one of "ACCOUNT", "RESOURCE"
2764
+ # resp.resource_policies[0].resource_arn #=> String
2765
+ # resp.resource_policies[0].revision_id #=> String
2741
2766
  # resp.next_token #=> String
2742
2767
  #
2743
2768
  # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies AWS API Documentation
@@ -3141,7 +3166,7 @@ module Aws::CloudWatchLogs
3141
3166
  # resp.delivery.arn #=> String
3142
3167
  # resp.delivery.delivery_source_name #=> String
3143
3168
  # resp.delivery.delivery_destination_arn #=> String
3144
- # resp.delivery.delivery_destination_type #=> String, one of "S3", "CWL", "FH"
3169
+ # resp.delivery.delivery_destination_type #=> String, one of "S3", "CWL", "FH", "XRAY"
3145
3170
  # resp.delivery.record_fields #=> Array
3146
3171
  # resp.delivery.record_fields[0] #=> String
3147
3172
  # resp.delivery.field_delimiter #=> String
@@ -3178,7 +3203,7 @@ module Aws::CloudWatchLogs
3178
3203
  #
3179
3204
  # resp.delivery_destination.name #=> String
3180
3205
  # resp.delivery_destination.arn #=> String
3181
- # resp.delivery_destination.delivery_destination_type #=> String, one of "S3", "CWL", "FH"
3206
+ # resp.delivery_destination.delivery_destination_type #=> String, one of "S3", "CWL", "FH", "XRAY"
3182
3207
  # resp.delivery_destination.output_format #=> String, one of "json", "plain", "w3c", "raw", "parquet"
3183
3208
  # resp.delivery_destination.delivery_destination_configuration.destination_resource_arn #=> String
3184
3209
  # resp.delivery_destination.tags #=> Hash
@@ -3609,6 +3634,180 @@ module Aws::CloudWatchLogs
3609
3634
  req.send_request(options)
3610
3635
  end
3611
3636
 
3637
+ # Retrieves a large logging object (LLO) and streams it back. This API
3638
+ # is used to fetch the content of large portions of log events that have
3639
+ # been ingested through the PutOpenTelemetryLogs API. When log events
3640
+ # contain fields that would cause the total event size to exceed 1MB,
3641
+ # CloudWatch Logs automatically processes up to 10 fields, starting with
3642
+ # the largest fields. Each field is truncated as needed to keep the
3643
+ # total event size as close to 1MB as possible. The excess portions are
3644
+ # stored as Large Log Objects (LLOs) and these fields are processed
3645
+ # separately and LLO reference system fields (in the format
3646
+ # `@ptr.$[path.to.field]`) are added. The path in the reference field
3647
+ # reflects the original JSON structure where the large field was
3648
+ # located. For example, this could be `@ptr.$['input']['message']`,
3649
+ # `@ptr.$['AAA']['BBB']['CCC']['DDD']`, `@ptr.$['AAA']`, or any other
3650
+ # path matching your log structure.
3651
+ #
3652
+ # @option params [Boolean] :unmask
3653
+ # A boolean flag that indicates whether to unmask sensitive log data.
3654
+ # When set to true, any masked or redacted data in the log object will
3655
+ # be displayed in its original form. Default is false.
3656
+ #
3657
+ # @option params [required, String] :log_object_pointer
3658
+ # A pointer to the specific log object to retrieve. This is a required
3659
+ # parameter that uniquely identifies the log object within CloudWatch
3660
+ # Logs. The pointer is typically obtained from a previous query or
3661
+ # filter operation.
3662
+ #
3663
+ # @return [Types::GetLogObjectResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3664
+ #
3665
+ # * {Types::GetLogObjectResponse#field_stream #field_stream} => Types::GetLogObjectResponseStream
3666
+ #
3667
+ # @example EventStream Operation Example
3668
+ #
3669
+ # # You can process the event once it arrives immediately, or wait until the
3670
+ # # full response is complete and iterate through the eventstream enumerator.
3671
+ #
3672
+ # # To interact with event immediately, you need to register get_log_object
3673
+ # # with callbacks. Callbacks can be registered for specific events or for all
3674
+ # # events, including error events.
3675
+ #
3676
+ # # Callbacks can be passed into the `:event_stream_handler` option or within a
3677
+ # # block statement attached to the #get_log_object call directly. Hybrid
3678
+ # # pattern of both is also supported.
3679
+ #
3680
+ # # `:event_stream_handler` option takes in either a Proc object or
3681
+ # # Aws::CloudWatchLogs::EventStreams::GetLogObjectResponseStream object.
3682
+ #
3683
+ # # Usage pattern a): Callbacks with a block attached to #get_log_object
3684
+ # # Example for registering callbacks for all event types and an error event
3685
+ # client.get_log_object(
3686
+ # # params input
3687
+ # ) do |stream|
3688
+ # stream.on_error_event do |event|
3689
+ # # catch unmodeled error event in the stream
3690
+ # raise event
3691
+ # # => Aws::Errors::EventError
3692
+ # # event.event_type => :error
3693
+ # # event.error_code => String
3694
+ # # event.error_message => String
3695
+ # end
3696
+ #
3697
+ # stream.on_event do |event|
3698
+ # # process all events arrive
3699
+ # puts event.event_type
3700
+ # # ...
3701
+ # end
3702
+ # end
3703
+ #
3704
+ # # Usage pattern b): Pass in `:event_stream_handler` for #get_log_object
3705
+ # # 1) Create a Aws::CloudWatchLogs::EventStreams::GetLogObjectResponseStream object
3706
+ # # Example for registering callbacks with specific events
3707
+ #
3708
+ # handler = Aws::CloudWatchLogs::EventStreams::GetLogObjectResponseStream.new
3709
+ # handler.on_fields_event do |event|
3710
+ # event # => Aws::CloudWatchLogs::Types::fields
3711
+ # end
3712
+ # handler.on_internal_streaming_exception_event do |event|
3713
+ # event # => Aws::CloudWatchLogs::Types::InternalStreamingException
3714
+ # end
3715
+ #
3716
+ # client.get_log_object(
3717
+ # # params inputs
3718
+ # event_stream_handler: handler
3719
+ # )
3720
+ #
3721
+ # # 2) Use a Ruby Proc object
3722
+ # # Example for registering callbacks with specific events
3723
+ # handler = Proc.new do |stream|
3724
+ # stream.on_fields_event do |event|
3725
+ # event # => Aws::CloudWatchLogs::Types::fields
3726
+ # end
3727
+ # stream.on_internal_streaming_exception_event do |event|
3728
+ # event # => Aws::CloudWatchLogs::Types::InternalStreamingException
3729
+ # end
3730
+ # end
3731
+ #
3732
+ # client.get_log_object(
3733
+ # # params inputs
3734
+ # event_stream_handler: handler
3735
+ # )
3736
+ #
3737
+ # # Usage pattern c): Hybrid pattern of a) and b)
3738
+ # handler = Aws::CloudWatchLogs::EventStreams::GetLogObjectResponseStream.new
3739
+ # handler.on_fields_event do |event|
3740
+ # event # => Aws::CloudWatchLogs::Types::fields
3741
+ # end
3742
+ # handler.on_internal_streaming_exception_event do |event|
3743
+ # event # => Aws::CloudWatchLogs::Types::InternalStreamingException
3744
+ # end
3745
+ #
3746
+ # client.get_log_object(
3747
+ # # params input
3748
+ # event_stream_handler: handler
3749
+ # ) do |stream|
3750
+ # stream.on_error_event do |event|
3751
+ # # catch unmodeled error event in the stream
3752
+ # raise event
3753
+ # # => Aws::Errors::EventError
3754
+ # # event.event_type => :error
3755
+ # # event.error_code => String
3756
+ # # event.error_message => String
3757
+ # end
3758
+ # end
3759
+ #
3760
+ # # You can also iterate through events after the response complete.
3761
+ # # Events are available at
3762
+ # resp.field_stream # => Enumerator
3763
+ # # For parameter input example, please refer to following request syntax.
3764
+ #
3765
+ # @example Request syntax with placeholder values
3766
+ #
3767
+ # resp = client.get_log_object({
3768
+ # unmask: false,
3769
+ # log_object_pointer: "LogObjectPointer", # required
3770
+ # })
3771
+ #
3772
+ # @example Response structure
3773
+ #
3774
+ # # All events are available at resp.field_stream:
3775
+ # resp.field_stream #=> Enumerator
3776
+ # resp.field_stream.event_types #=> [:fields, :internal_streaming_exception]
3777
+ #
3778
+ # # For :fields event available at #on_fields_event callback and response eventstream enumerator:
3779
+ # event.data #=> String
3780
+ #
3781
+ # # For :internal_streaming_exception event available at #on_internal_streaming_exception_event callback and response eventstream enumerator:
3782
+ # event.message #=> String
3783
+ #
3784
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogObject AWS API Documentation
3785
+ #
3786
+ # @overload get_log_object(params = {})
3787
+ # @param [Hash] params ({})
3788
+ def get_log_object(params = {}, options = {})
3789
+ params = params.dup
3790
+ event_stream_handler = case handler = params.delete(:event_stream_handler)
3791
+ when EventStreams::GetLogObjectResponseStream then handler
3792
+ when Proc then EventStreams::GetLogObjectResponseStream.new.tap(&handler)
3793
+ when nil then EventStreams::GetLogObjectResponseStream.new
3794
+ else
3795
+ msg = "expected :event_stream_handler to be a block or "\
3796
+ "instance of Aws::CloudWatchLogs::EventStreams::GetLogObjectResponseStream"\
3797
+ ", got `#{handler.inspect}` instead"
3798
+ raise ArgumentError, msg
3799
+ end
3800
+
3801
+ yield(event_stream_handler) if block_given?
3802
+
3803
+ req = build_request(:get_log_object, params)
3804
+
3805
+ req.context[:event_stream_handler] = event_stream_handler
3806
+ req.handlers.add(Aws::Binary::DecodeHandler, priority: 95)
3807
+
3808
+ req.send_request(options)
3809
+ end
3810
+
3612
3811
  # Retrieves all of the fields and values of a single log event. All
3613
3812
  # fields are retrieved, even if the original query that produced the
3614
3813
  # `logRecordPointer` retrieved only a subset of fields. Fields are
@@ -4259,8 +4458,9 @@ module Aws::CloudWatchLogs
4259
4458
  end
4260
4459
 
4261
4460
  # Creates an account-level data protection policy, subscription filter
4262
- # policy, or field index policy that applies to all log groups or a
4263
- # subset of log groups in the account.
4461
+ # policy, field index policy, transformer policy, or metric extraction
4462
+ # policy that applies to all log groups or a subset of log groups in the
4463
+ # account.
4264
4464
  #
4265
4465
  # To use this operation, you must be signed on with the correct
4266
4466
  # permissions depending on the type of policy that you are creating.
@@ -4270,7 +4470,8 @@ module Aws::CloudWatchLogs
4270
4470
  # permissions.
4271
4471
  #
4272
4472
  # * To create a subscription filter policy, you must have the
4273
- # `logs:PutSubscriptionFilter` and `logs:PutccountPolicy` permissions.
4473
+ # `logs:PutSubscriptionFilter` and `logs:PutAccountPolicy`
4474
+ # permissions.
4274
4475
  #
4275
4476
  # * To create a transformer policy, you must have the
4276
4477
  # `logs:PutTransformer` and `logs:PutAccountPolicy` permissions.
@@ -4278,6 +4479,10 @@ module Aws::CloudWatchLogs
4278
4479
  # * To create a field index policy, you must have the
4279
4480
  # `logs:PutIndexPolicy` and `logs:PutAccountPolicy` permissions.
4280
4481
  #
4482
+ # * To create a metric extraction policy, you must have the
4483
+ # `logs:PutMetricExtractionPolicy` and `logs:PutAccountPolicy`
4484
+ # permissions.
4485
+ #
4281
4486
  # **Data protection policy**
4282
4487
  #
4283
4488
  # A data protection policy can help safeguard sensitive data that's
@@ -4445,6 +4650,68 @@ module Aws::CloudWatchLogs
4445
4650
  # ignore the account-level policy that you create with
4446
4651
  # [PutAccountPolicy][11].
4447
4652
  #
4653
+ # **Metric extraction policy**
4654
+ #
4655
+ # A metric extraction policy controls whether CloudWatch Metrics can be
4656
+ # created through the Embedded Metrics Format (EMF) for log groups in
4657
+ # your account. By default, EMF metric creation is enabled for all log
4658
+ # groups. You can use metric extraction policies to disable EMF metric
4659
+ # creation for your entire account or specific log groups.
4660
+ #
4661
+ # When a policy disables EMF metric creation for a log group, log events
4662
+ # in the EMF format are still ingested, but no CloudWatch Metrics are
4663
+ # created from them.
4664
+ #
4665
+ # Creating a policy disables metrics for AWS features that use EMF to
4666
+ # create metrics, such as CloudWatch Container Insights and CloudWatch
4667
+ # Application Signals. To prevent turning off those features by
4668
+ # accident, we recommend that you exclude the underlying log-groups
4669
+ # through a selection-criteria such as `LogGroupNamePrefix NOT IN
4670
+ # ["/aws/containerinsights", "/aws/ecs/containerinsights",
4671
+ # "/aws/application-signals/data"]`.
4672
+ #
4673
+ # Each account can have either one account-level metric extraction
4674
+ # policy that applies to all log groups, or up to 5 policies that are
4675
+ # each scoped to a subset of log groups with the `selectionCriteria`
4676
+ # parameter. The selection criteria supports filtering by `LogGroupName`
4677
+ # and `LogGroupNamePrefix` using the operators `IN` and `NOT IN`. You
4678
+ # can specify up to 50 values in each `IN` or `NOT IN` list.
4679
+ #
4680
+ # The selection criteria can be specified in these formats:
4681
+ #
4682
+ # `LogGroupName IN ["log-group-1", "log-group-2"]`
4683
+ #
4684
+ # `LogGroupNamePrefix NOT IN ["/aws/prefix1", "/aws/prefix2"]`
4685
+ #
4686
+ # If you have multiple account-level metric extraction policies with
4687
+ # selection criteria, no two of them can have overlapping criteria. For
4688
+ # example, if you have one policy with selection criteria
4689
+ # `LogGroupNamePrefix IN ["my-log"]`, you can't have another metric
4690
+ # extraction policy with selection criteria `LogGroupNamePrefix IN
4691
+ # ["/my-log-prod"]` or `LogGroupNamePrefix IN ["/my-logging"]`, as the
4692
+ # set of log groups matching these prefixes would be a subset of the log
4693
+ # groups matching the first policy's prefix, creating an overlap.
4694
+ #
4695
+ # When using `NOT IN`, only one policy with this operator is allowed per
4696
+ # account.
4697
+ #
4698
+ # When combining policies with `IN` and `NOT IN` operators, the overlap
4699
+ # check ensures that policies don't have conflicting effects. Two
4700
+ # policies with `IN` and `NOT IN` operators do not overlap if and only
4701
+ # if every value in the `IN `policy is completely contained within some
4702
+ # value in the `NOT IN` policy. For example:
4703
+ #
4704
+ # * If you have a `NOT IN` policy for prefix `"/aws/lambda"`, you can
4705
+ # create an `IN` policy for the exact log group name
4706
+ # `"/aws/lambda/function1"` because the set of log groups matching
4707
+ # `"/aws/lambda/function1"` is a subset of the log groups matching
4708
+ # `"/aws/lambda"`.
4709
+ #
4710
+ # * If you have a `NOT IN` policy for prefix `"/aws/lambda"`, you cannot
4711
+ # create an `IN` policy for prefix `"/aws"` because the set of log
4712
+ # groups matching `"/aws"` is not a subset of the log groups matching
4713
+ # `"/aws/lambda"`.
4714
+ #
4448
4715
  #
4449
4716
  #
4450
4717
  # [1]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html
@@ -4580,7 +4847,7 @@ module Aws::CloudWatchLogs
4580
4847
  # Use this parameter to apply the new policy to a subset of log groups
4581
4848
  # in the account.
4582
4849
  #
4583
- # Specifing `selectionCriteria` is valid only when you specify
4850
+ # Specifying `selectionCriteria` is valid only when you specify
4584
4851
  # `SUBSCRIPTION_FILTER_POLICY`, `FIELD_INDEX_POLICY` or
4585
4852
  # `TRANSFORMER_POLICY`for `policyType`.
4586
4853
  #
@@ -4610,7 +4877,7 @@ module Aws::CloudWatchLogs
4610
4877
  # resp = client.put_account_policy({
4611
4878
  # policy_name: "PolicyName", # required
4612
4879
  # policy_document: "AccountPolicyDocument", # required
4613
- # policy_type: "DATA_PROTECTION_POLICY", # required, accepts DATA_PROTECTION_POLICY, SUBSCRIPTION_FILTER_POLICY, FIELD_INDEX_POLICY, TRANSFORMER_POLICY
4880
+ # policy_type: "DATA_PROTECTION_POLICY", # required, accepts DATA_PROTECTION_POLICY, SUBSCRIPTION_FILTER_POLICY, FIELD_INDEX_POLICY, TRANSFORMER_POLICY, METRIC_EXTRACTION_POLICY
4614
4881
  # scope: "ALL", # accepts ALL
4615
4882
  # selection_criteria: "SelectionCriteria",
4616
4883
  # })
@@ -4620,7 +4887,7 @@ module Aws::CloudWatchLogs
4620
4887
  # resp.account_policy.policy_name #=> String
4621
4888
  # resp.account_policy.policy_document #=> String
4622
4889
  # resp.account_policy.last_updated_time #=> Integer
4623
- # resp.account_policy.policy_type #=> String, one of "DATA_PROTECTION_POLICY", "SUBSCRIPTION_FILTER_POLICY", "FIELD_INDEX_POLICY", "TRANSFORMER_POLICY"
4890
+ # resp.account_policy.policy_type #=> String, one of "DATA_PROTECTION_POLICY", "SUBSCRIPTION_FILTER_POLICY", "FIELD_INDEX_POLICY", "TRANSFORMER_POLICY", "METRIC_EXTRACTION_POLICY"
4624
4891
  # resp.account_policy.scope #=> String, one of "ALL"
4625
4892
  # resp.account_policy.selection_criteria #=> String
4626
4893
  # resp.account_policy.account_id #=> String
@@ -4746,7 +5013,8 @@ module Aws::CloudWatchLogs
4746
5013
  # Creates or updates a logical *delivery destination*. A delivery
4747
5014
  # destination is an Amazon Web Services resource that represents an
4748
5015
  # Amazon Web Services service that logs can be sent to. CloudWatch Logs,
4749
- # Amazon S3, and Firehose are supported as logs delivery destinations.
5016
+ # Amazon S3, and Firehose are supported as logs delivery destinations
5017
+ # and X-Ray as the trace delivery destination.
4750
5018
  #
4751
5019
  # To configure logs delivery between a supported Amazon Web Services
4752
5020
  # service and a destination, you must do the following:
@@ -4797,10 +5065,34 @@ module Aws::CloudWatchLogs
4797
5065
  # @option params [String] :output_format
4798
5066
  # The format for the logs that this delivery destination will receive.
4799
5067
  #
4800
- # @option params [required, Types::DeliveryDestinationConfiguration] :delivery_destination_configuration
5068
+ # @option params [Types::DeliveryDestinationConfiguration] :delivery_destination_configuration
4801
5069
  # A structure that contains the ARN of the Amazon Web Services resource
4802
5070
  # that will receive the logs.
4803
5071
  #
5072
+ # <note markdown="1"> `deliveryDestinationConfiguration` is required for CloudWatch Logs,
5073
+ # Amazon S3, Firehose log delivery destinations and not required for
5074
+ # X-Ray trace delivery destinations. `deliveryDestinationType` is needed
5075
+ # for X-Ray trace delivery destinations but not required for other logs
5076
+ # delivery destinations.
5077
+ #
5078
+ # </note>
5079
+ #
5080
+ # @option params [String] :delivery_destination_type
5081
+ # The type of delivery destination. This parameter specifies the target
5082
+ # service where log data will be delivered. Valid values include:
5083
+ #
5084
+ # * `S3` - Amazon S3 for long-term storage and analytics
5085
+ #
5086
+ # * `CWL` - CloudWatch Logs for centralized log management
5087
+ #
5088
+ # * `FH` - Amazon Kinesis Data Firehose for real-time data streaming
5089
+ #
5090
+ # * `XRAY` - Amazon Web Services X-Ray for distributed tracing and
5091
+ # application monitoring
5092
+ #
5093
+ # The delivery destination type determines the format and configuration
5094
+ # options available for log delivery.
5095
+ #
4804
5096
  # @option params [Hash<String,String>] :tags
4805
5097
  # An optional list of key-value pairs to associate with the resource.
4806
5098
  #
@@ -4820,9 +5112,10 @@ module Aws::CloudWatchLogs
4820
5112
  # resp = client.put_delivery_destination({
4821
5113
  # name: "DeliveryDestinationName", # required
4822
5114
  # output_format: "json", # accepts json, plain, w3c, raw, parquet
4823
- # delivery_destination_configuration: { # required
5115
+ # delivery_destination_configuration: {
4824
5116
  # destination_resource_arn: "Arn", # required
4825
5117
  # },
5118
+ # delivery_destination_type: "S3", # accepts S3, CWL, FH, XRAY
4826
5119
  # tags: {
4827
5120
  # "TagKey" => "TagValue",
4828
5121
  # },
@@ -4832,7 +5125,7 @@ module Aws::CloudWatchLogs
4832
5125
  #
4833
5126
  # resp.delivery_destination.name #=> String
4834
5127
  # resp.delivery_destination.arn #=> String
4835
- # resp.delivery_destination.delivery_destination_type #=> String, one of "S3", "CWL", "FH"
5128
+ # resp.delivery_destination.delivery_destination_type #=> String, one of "S3", "CWL", "FH", "XRAY"
4836
5129
  # resp.delivery_destination.output_format #=> String, one of "json", "plain", "w3c", "raw", "parquet"
4837
5130
  # resp.delivery_destination.delivery_destination_configuration.destination_resource_arn #=> String
4838
5131
  # resp.delivery_destination.tags #=> Hash
@@ -4917,7 +5210,7 @@ module Aws::CloudWatchLogs
4917
5210
  # Creates or updates a logical *delivery source*. A delivery source
4918
5211
  # represents an Amazon Web Services resource that sends logs to an logs
4919
5212
  # delivery destination. The destination can be CloudWatch Logs, Amazon
4920
- # S3, or Firehose.
5213
+ # S3, Firehose or X-Ray for sending traces.
4921
5214
  #
4922
5215
  # To configure logs delivery between a delivery destination and an
4923
5216
  # Amazon Web Services service that is supported as a delivery source,
@@ -4973,7 +5266,8 @@ module Aws::CloudWatchLogs
4973
5266
  # @option params [required, String] :log_type
4974
5267
  # Defines the type of log that the source is sending.
4975
5268
  #
4976
- # * For Amazon Bedrock, the valid value is `APPLICATION_LOGS`.
5269
+ # * For Amazon Bedrock, the valid value is `APPLICATION_LOGS` and
5270
+ # `TRACES`.
4977
5271
  #
4978
5272
  # * For CloudFront, the valid value is `ACCESS_LOGS`.
4979
5273
  #
@@ -4990,6 +5284,9 @@ module Aws::CloudWatchLogs
4990
5284
  #
4991
5285
  # * For IAM Identity Center, the valid value is `ERROR_LOGS`.
4992
5286
  #
5287
+ # * For PCS, the valid values are `PCS_SCHEDULER_LOGS` and
5288
+ # `PCS_JOBCOMP_LOGS`.
5289
+ #
4993
5290
  # * For Amazon Q, the valid value is `EVENT_LOGS`.
4994
5291
  #
4995
5292
  # * For Amazon SES mail manager, the valid values are `APPLICATION_LOG`
@@ -5000,6 +5297,8 @@ module Aws::CloudWatchLogs
5000
5297
  # `WORKMAIL_MAILBOX_ACCESS_LOGS`, and
5001
5298
  # `WORKMAIL_PERSONAL_ACCESS_TOKEN_LOGS`.
5002
5299
  #
5300
+ # * For Amazon VPC Route Server, the valid value is `EVENT_LOGS`.
5301
+ #
5003
5302
  # @option params [Hash<String,String>] :tags
5004
5303
  # An optional list of key-value pairs to associate with the resource.
5005
5304
  #
@@ -5696,15 +5995,27 @@ module Aws::CloudWatchLogs
5696
5995
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn
5697
5996
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceaccount
5698
5997
  #
5998
+ # @option params [String] :resource_arn
5999
+ # The ARN of the CloudWatch Logs resource to which the resource policy
6000
+ # needs to be added or attached. Currently only supports LogGroup ARN.
6001
+ #
6002
+ # @option params [String] :expected_revision_id
6003
+ # The expected revision ID of the resource policy. Required when
6004
+ # `resourceArn` is provided to prevent concurrent modifications. Use
6005
+ # `null` when creating a resource policy for the first time.
6006
+ #
5699
6007
  # @return [Types::PutResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5700
6008
  #
5701
6009
  # * {Types::PutResourcePolicyResponse#resource_policy #resource_policy} => Types::ResourcePolicy
6010
+ # * {Types::PutResourcePolicyResponse#revision_id #revision_id} => String
5702
6011
  #
5703
6012
  # @example Request syntax with placeholder values
5704
6013
  #
5705
6014
  # resp = client.put_resource_policy({
5706
6015
  # policy_name: "PolicyName",
5707
6016
  # policy_document: "PolicyDocument",
6017
+ # resource_arn: "Arn",
6018
+ # expected_revision_id: "ExpectedRevisionId",
5708
6019
  # })
5709
6020
  #
5710
6021
  # @example Response structure
@@ -5712,6 +6023,10 @@ module Aws::CloudWatchLogs
5712
6023
  # resp.resource_policy.policy_name #=> String
5713
6024
  # resp.resource_policy.policy_document #=> String
5714
6025
  # resp.resource_policy.last_updated_time #=> Integer
6026
+ # resp.resource_policy.policy_scope #=> String, one of "ACCOUNT", "RESOURCE"
6027
+ # resp.resource_policy.resource_arn #=> String
6028
+ # resp.resource_policy.revision_id #=> String
6029
+ # resp.revision_id #=> String
5715
6030
  #
5716
6031
  # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy AWS API Documentation
5717
6032
  #
@@ -6947,9 +7262,9 @@ module Aws::CloudWatchLogs
6947
7262
  # To list the tags for a log group, use [ListTagsForResource][2]. To add
6948
7263
  # tags, use [TagResource][3].
6949
7264
  #
6950
- # CloudWatch Logs doesn't support IAM policies that prevent users from
6951
- # assigning specified tags to log groups using the
6952
- # `aws:Resource/key-name ` or `aws:TagKeys` condition keys.
7265
+ # When using IAM policies to control tag management for CloudWatch Logs
7266
+ # log groups, the condition keys `aws:Resource/key-name` and
7267
+ # `aws:TagKeys` cannot be used to restrict which tags users can assign.
6953
7268
  #
6954
7269
  #
6955
7270
  #
@@ -7217,7 +7532,7 @@ module Aws::CloudWatchLogs
7217
7532
  tracer: tracer
7218
7533
  )
7219
7534
  context[:gem_name] = 'aws-sdk-cloudwatchlogs'
7220
- context[:gem_version] = '1.119.0'
7535
+ context[:gem_version] = '1.121.0'
7221
7536
  Seahorse::Client::Request.new(handlers, context)
7222
7537
  end
7223
7538