aws-sdk-cloudwatchlogs 1.53.0 → 1.55.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.
@@ -0,0 +1,158 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::CloudWatchLogs
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::CloudWatchLogs::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::CloudWatchLogs::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::CloudWatchLogs::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :associate_kms_key
60
+ Aws::CloudWatchLogs::Endpoints::AssociateKmsKey.build(context)
61
+ when :cancel_export_task
62
+ Aws::CloudWatchLogs::Endpoints::CancelExportTask.build(context)
63
+ when :create_export_task
64
+ Aws::CloudWatchLogs::Endpoints::CreateExportTask.build(context)
65
+ when :create_log_group
66
+ Aws::CloudWatchLogs::Endpoints::CreateLogGroup.build(context)
67
+ when :create_log_stream
68
+ Aws::CloudWatchLogs::Endpoints::CreateLogStream.build(context)
69
+ when :delete_destination
70
+ Aws::CloudWatchLogs::Endpoints::DeleteDestination.build(context)
71
+ when :delete_log_group
72
+ Aws::CloudWatchLogs::Endpoints::DeleteLogGroup.build(context)
73
+ when :delete_log_stream
74
+ Aws::CloudWatchLogs::Endpoints::DeleteLogStream.build(context)
75
+ when :delete_metric_filter
76
+ Aws::CloudWatchLogs::Endpoints::DeleteMetricFilter.build(context)
77
+ when :delete_query_definition
78
+ Aws::CloudWatchLogs::Endpoints::DeleteQueryDefinition.build(context)
79
+ when :delete_resource_policy
80
+ Aws::CloudWatchLogs::Endpoints::DeleteResourcePolicy.build(context)
81
+ when :delete_retention_policy
82
+ Aws::CloudWatchLogs::Endpoints::DeleteRetentionPolicy.build(context)
83
+ when :delete_subscription_filter
84
+ Aws::CloudWatchLogs::Endpoints::DeleteSubscriptionFilter.build(context)
85
+ when :describe_destinations
86
+ Aws::CloudWatchLogs::Endpoints::DescribeDestinations.build(context)
87
+ when :describe_export_tasks
88
+ Aws::CloudWatchLogs::Endpoints::DescribeExportTasks.build(context)
89
+ when :describe_log_groups
90
+ Aws::CloudWatchLogs::Endpoints::DescribeLogGroups.build(context)
91
+ when :describe_log_streams
92
+ Aws::CloudWatchLogs::Endpoints::DescribeLogStreams.build(context)
93
+ when :describe_metric_filters
94
+ Aws::CloudWatchLogs::Endpoints::DescribeMetricFilters.build(context)
95
+ when :describe_queries
96
+ Aws::CloudWatchLogs::Endpoints::DescribeQueries.build(context)
97
+ when :describe_query_definitions
98
+ Aws::CloudWatchLogs::Endpoints::DescribeQueryDefinitions.build(context)
99
+ when :describe_resource_policies
100
+ Aws::CloudWatchLogs::Endpoints::DescribeResourcePolicies.build(context)
101
+ when :describe_subscription_filters
102
+ Aws::CloudWatchLogs::Endpoints::DescribeSubscriptionFilters.build(context)
103
+ when :disassociate_kms_key
104
+ Aws::CloudWatchLogs::Endpoints::DisassociateKmsKey.build(context)
105
+ when :filter_log_events
106
+ Aws::CloudWatchLogs::Endpoints::FilterLogEvents.build(context)
107
+ when :get_log_events
108
+ Aws::CloudWatchLogs::Endpoints::GetLogEvents.build(context)
109
+ when :get_log_group_fields
110
+ Aws::CloudWatchLogs::Endpoints::GetLogGroupFields.build(context)
111
+ when :get_log_record
112
+ Aws::CloudWatchLogs::Endpoints::GetLogRecord.build(context)
113
+ when :get_query_results
114
+ Aws::CloudWatchLogs::Endpoints::GetQueryResults.build(context)
115
+ when :list_tags_for_resource
116
+ Aws::CloudWatchLogs::Endpoints::ListTagsForResource.build(context)
117
+ when :list_tags_log_group
118
+ Aws::CloudWatchLogs::Endpoints::ListTagsLogGroup.build(context)
119
+ when :put_destination
120
+ Aws::CloudWatchLogs::Endpoints::PutDestination.build(context)
121
+ when :put_destination_policy
122
+ Aws::CloudWatchLogs::Endpoints::PutDestinationPolicy.build(context)
123
+ when :put_log_events
124
+ Aws::CloudWatchLogs::Endpoints::PutLogEvents.build(context)
125
+ when :put_metric_filter
126
+ Aws::CloudWatchLogs::Endpoints::PutMetricFilter.build(context)
127
+ when :put_query_definition
128
+ Aws::CloudWatchLogs::Endpoints::PutQueryDefinition.build(context)
129
+ when :put_resource_policy
130
+ Aws::CloudWatchLogs::Endpoints::PutResourcePolicy.build(context)
131
+ when :put_retention_policy
132
+ Aws::CloudWatchLogs::Endpoints::PutRetentionPolicy.build(context)
133
+ when :put_subscription_filter
134
+ Aws::CloudWatchLogs::Endpoints::PutSubscriptionFilter.build(context)
135
+ when :start_query
136
+ Aws::CloudWatchLogs::Endpoints::StartQuery.build(context)
137
+ when :stop_query
138
+ Aws::CloudWatchLogs::Endpoints::StopQuery.build(context)
139
+ when :tag_log_group
140
+ Aws::CloudWatchLogs::Endpoints::TagLogGroup.build(context)
141
+ when :tag_resource
142
+ Aws::CloudWatchLogs::Endpoints::TagResource.build(context)
143
+ when :test_metric_filter
144
+ Aws::CloudWatchLogs::Endpoints::TestMetricFilter.build(context)
145
+ when :untag_log_group
146
+ Aws::CloudWatchLogs::Endpoints::UntagLogGroup.build(context)
147
+ when :untag_resource
148
+ Aws::CloudWatchLogs::Endpoints::UntagResource.build(context)
149
+ end
150
+ end
151
+ end
152
+
153
+ def add_handlers(handlers, _config)
154
+ handlers.add(Handler, step: :build, priority: 75)
155
+ end
156
+ end
157
+ end
158
+ end
@@ -1569,6 +1569,50 @@ module Aws::CloudWatchLogs
1569
1569
  #
1570
1570
  class LimitExceededException < Aws::EmptyStructure; end
1571
1571
 
1572
+ # @note When making an API call, you may pass ListTagsForResourceRequest
1573
+ # data as a hash:
1574
+ #
1575
+ # {
1576
+ # resource_arn: "AmazonResourceName", # required
1577
+ # }
1578
+ #
1579
+ # @!attribute [rw] resource_arn
1580
+ # The ARN of the resource that you want to view tags for.
1581
+ #
1582
+ # The ARN format of a log group is
1583
+ # `arn:aws:logs:Region:account-id:log-group:log-group-name `
1584
+ #
1585
+ # The ARN format of a destination is
1586
+ # `arn:aws:logs:Region:account-id:destination:destination-name `
1587
+ #
1588
+ # For more information about ARN format, see [CloudWatch Logs
1589
+ # resources and operations][1].
1590
+ #
1591
+ #
1592
+ #
1593
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html
1594
+ # @return [String]
1595
+ #
1596
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsForResourceRequest AWS API Documentation
1597
+ #
1598
+ class ListTagsForResourceRequest < Struct.new(
1599
+ :resource_arn)
1600
+ SENSITIVE = []
1601
+ include Aws::Structure
1602
+ end
1603
+
1604
+ # @!attribute [rw] tags
1605
+ # The list of tags associated with the requested resource.&gt;
1606
+ # @return [Hash<String,String>]
1607
+ #
1608
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsForResourceResponse AWS API Documentation
1609
+ #
1610
+ class ListTagsForResourceResponse < Struct.new(
1611
+ :tags)
1612
+ SENSITIVE = []
1613
+ include Aws::Structure
1614
+ end
1615
+
1572
1616
  # @note When making an API call, you may pass ListTagsLogGroupRequest
1573
1617
  # data as a hash:
1574
1618
  #
@@ -1614,7 +1658,7 @@ module Aws::CloudWatchLogs
1614
1658
  # @!attribute [rw] retention_in_days
1615
1659
  # The number of days to retain the log events in the specified log
1616
1660
  # group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150,
1617
- # 180, 365, 400, 545, 731, 1827, 2192, 2557, 2922, 3288, and 3653.
1661
+ # 180, 365, 400, 545, 731, 1827, and 3653.
1618
1662
  #
1619
1663
  # To set a log group to never have log events expire, use
1620
1664
  # [DeleteRetentionPolicy][1].
@@ -1997,6 +2041,9 @@ module Aws::CloudWatchLogs
1997
2041
  # destination_name: "DestinationName", # required
1998
2042
  # target_arn: "TargetArn", # required
1999
2043
  # role_arn: "RoleArn", # required
2044
+ # tags: {
2045
+ # "TagKey" => "TagValue",
2046
+ # },
2000
2047
  # }
2001
2048
  #
2002
2049
  # @!attribute [rw] destination_name
@@ -2014,12 +2061,24 @@ module Aws::CloudWatchLogs
2014
2061
  # stream.
2015
2062
  # @return [String]
2016
2063
  #
2064
+ # @!attribute [rw] tags
2065
+ # An optional list of key-value pairs to associate with the resource.
2066
+ #
2067
+ # For more information about tagging, see [Tagging Amazon Web Services
2068
+ # resources][1]
2069
+ #
2070
+ #
2071
+ #
2072
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
2073
+ # @return [Hash<String,String>]
2074
+ #
2017
2075
  # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationRequest AWS API Documentation
2018
2076
  #
2019
2077
  class PutDestinationRequest < Struct.new(
2020
2078
  :destination_name,
2021
2079
  :target_arn,
2022
- :role_arn)
2080
+ :role_arn,
2081
+ :tags)
2023
2082
  SENSITIVE = []
2024
2083
  include Aws::Structure
2025
2084
  end
@@ -2314,7 +2373,7 @@ module Aws::CloudWatchLogs
2314
2373
  # @!attribute [rw] retention_in_days
2315
2374
  # The number of days to retain the log events in the specified log
2316
2375
  # group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150,
2317
- # 180, 365, 400, 545, 731, 1827, 2192, 2557, 2922, 3288, and 3653.
2376
+ # 180, 365, 400, 545, 731, 1827, and 3653.
2318
2377
  #
2319
2378
  # To set a log group to never have log events expire, use
2320
2379
  # [DeleteRetentionPolicy][1].
@@ -2860,6 +2919,46 @@ module Aws::CloudWatchLogs
2860
2919
  include Aws::Structure
2861
2920
  end
2862
2921
 
2922
+ # @note When making an API call, you may pass TagResourceRequest
2923
+ # data as a hash:
2924
+ #
2925
+ # {
2926
+ # resource_arn: "AmazonResourceName", # required
2927
+ # tags: { # required
2928
+ # "TagKey" => "TagValue",
2929
+ # },
2930
+ # }
2931
+ #
2932
+ # @!attribute [rw] resource_arn
2933
+ # The ARN of the resource that you're adding tags to.
2934
+ #
2935
+ # The ARN format of a log group is
2936
+ # `arn:aws:logs:Region:account-id:log-group:log-group-name `
2937
+ #
2938
+ # The ARN format of a destination is
2939
+ # `arn:aws:logs:Region:account-id:destination:destination-name `
2940
+ #
2941
+ # For more information about ARN format, see [CloudWatch Logs
2942
+ # resources and operations][1].
2943
+ #
2944
+ #
2945
+ #
2946
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html
2947
+ # @return [String]
2948
+ #
2949
+ # @!attribute [rw] tags
2950
+ # The list of key-value pairs to associate with the resource.
2951
+ # @return [Hash<String,String>]
2952
+ #
2953
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagResourceRequest AWS API Documentation
2954
+ #
2955
+ class TagResourceRequest < Struct.new(
2956
+ :resource_arn,
2957
+ :tags)
2958
+ SENSITIVE = []
2959
+ include Aws::Structure
2960
+ end
2961
+
2863
2962
  # @note When making an API call, you may pass TestMetricFilterRequest
2864
2963
  # data as a hash:
2865
2964
  #
@@ -2900,6 +2999,24 @@ module Aws::CloudWatchLogs
2900
2999
  include Aws::Structure
2901
3000
  end
2902
3001
 
3002
+ # A resource can have no more than 50 tags.
3003
+ #
3004
+ # @!attribute [rw] message
3005
+ # @return [String]
3006
+ #
3007
+ # @!attribute [rw] resource_name
3008
+ # The name of the resource.
3009
+ # @return [String]
3010
+ #
3011
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TooManyTagsException AWS API Documentation
3012
+ #
3013
+ class TooManyTagsException < Struct.new(
3014
+ :message,
3015
+ :resource_name)
3016
+ SENSITIVE = []
3017
+ include Aws::Structure
3018
+ end
3019
+
2903
3020
  # The most likely cause is an invalid Amazon Web Services access key ID
2904
3021
  # or secret key.
2905
3022
  #
@@ -2932,5 +3049,44 @@ module Aws::CloudWatchLogs
2932
3049
  include Aws::Structure
2933
3050
  end
2934
3051
 
3052
+ # @note When making an API call, you may pass UntagResourceRequest
3053
+ # data as a hash:
3054
+ #
3055
+ # {
3056
+ # resource_arn: "AmazonResourceName", # required
3057
+ # tag_keys: ["TagKey"], # required
3058
+ # }
3059
+ #
3060
+ # @!attribute [rw] resource_arn
3061
+ # The ARN of the CloudWatch Logs resource that you're removing tags
3062
+ # from.
3063
+ #
3064
+ # The ARN format of a log group is
3065
+ # `arn:aws:logs:Region:account-id:log-group:log-group-name `
3066
+ #
3067
+ # The ARN format of a destination is
3068
+ # `arn:aws:logs:Region:account-id:destination:destination-name `
3069
+ #
3070
+ # For more information about ARN format, see [CloudWatch Logs
3071
+ # resources and operations][1].
3072
+ #
3073
+ #
3074
+ #
3075
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html
3076
+ # @return [String]
3077
+ #
3078
+ # @!attribute [rw] tag_keys
3079
+ # The list of tag keys to remove from the resource.
3080
+ # @return [Array<String>]
3081
+ #
3082
+ # @see http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagResourceRequest AWS API Documentation
3083
+ #
3084
+ class UntagResourceRequest < Struct.new(
3085
+ :resource_arn,
3086
+ :tag_keys)
3087
+ SENSITIVE = []
3088
+ include Aws::Structure
3089
+ end
3090
+
2935
3091
  end
2936
3092
  end
@@ -13,9 +13,13 @@ require 'aws-sigv4'
13
13
 
14
14
  require_relative 'aws-sdk-cloudwatchlogs/types'
15
15
  require_relative 'aws-sdk-cloudwatchlogs/client_api'
16
+ require_relative 'aws-sdk-cloudwatchlogs/plugins/endpoints.rb'
16
17
  require_relative 'aws-sdk-cloudwatchlogs/client'
17
18
  require_relative 'aws-sdk-cloudwatchlogs/errors'
18
19
  require_relative 'aws-sdk-cloudwatchlogs/resource'
20
+ require_relative 'aws-sdk-cloudwatchlogs/endpoint_parameters'
21
+ require_relative 'aws-sdk-cloudwatchlogs/endpoint_provider'
22
+ require_relative 'aws-sdk-cloudwatchlogs/endpoints'
19
23
  require_relative 'aws-sdk-cloudwatchlogs/customizations'
20
24
 
21
25
  # This module provides support for Amazon CloudWatch Logs. This module is available in the
@@ -48,6 +52,6 @@ require_relative 'aws-sdk-cloudwatchlogs/customizations'
48
52
  # @!group service
49
53
  module Aws::CloudWatchLogs
50
54
 
51
- GEM_VERSION = '1.53.0'
55
+ GEM_VERSION = '1.55.0'
52
56
 
53
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-cloudwatchlogs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.53.0
4
+ version: 1.55.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-20 00:00:00.000000000 Z
11
+ date: 2022-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.127.0
22
+ version: 3.165.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.127.0
32
+ version: 3.165.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +59,11 @@ files:
59
59
  - lib/aws-sdk-cloudwatchlogs/client.rb
60
60
  - lib/aws-sdk-cloudwatchlogs/client_api.rb
61
61
  - lib/aws-sdk-cloudwatchlogs/customizations.rb
62
+ - lib/aws-sdk-cloudwatchlogs/endpoint_parameters.rb
63
+ - lib/aws-sdk-cloudwatchlogs/endpoint_provider.rb
64
+ - lib/aws-sdk-cloudwatchlogs/endpoints.rb
62
65
  - lib/aws-sdk-cloudwatchlogs/errors.rb
66
+ - lib/aws-sdk-cloudwatchlogs/plugins/endpoints.rb
63
67
  - lib/aws-sdk-cloudwatchlogs/resource.rb
64
68
  - lib/aws-sdk-cloudwatchlogs/types.rb
65
69
  homepage: https://github.com/aws/aws-sdk-ruby