aws-sdk-shield 1.48.0 → 1.50.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,140 @@
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::Shield
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::Shield::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::Shield::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::Shield::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_drt_log_bucket
60
+ Aws::Shield::Endpoints::AssociateDRTLogBucket.build(context)
61
+ when :associate_drt_role
62
+ Aws::Shield::Endpoints::AssociateDRTRole.build(context)
63
+ when :associate_health_check
64
+ Aws::Shield::Endpoints::AssociateHealthCheck.build(context)
65
+ when :associate_proactive_engagement_details
66
+ Aws::Shield::Endpoints::AssociateProactiveEngagementDetails.build(context)
67
+ when :create_protection
68
+ Aws::Shield::Endpoints::CreateProtection.build(context)
69
+ when :create_protection_group
70
+ Aws::Shield::Endpoints::CreateProtectionGroup.build(context)
71
+ when :create_subscription
72
+ Aws::Shield::Endpoints::CreateSubscription.build(context)
73
+ when :delete_protection
74
+ Aws::Shield::Endpoints::DeleteProtection.build(context)
75
+ when :delete_protection_group
76
+ Aws::Shield::Endpoints::DeleteProtectionGroup.build(context)
77
+ when :delete_subscription
78
+ Aws::Shield::Endpoints::DeleteSubscription.build(context)
79
+ when :describe_attack
80
+ Aws::Shield::Endpoints::DescribeAttack.build(context)
81
+ when :describe_attack_statistics
82
+ Aws::Shield::Endpoints::DescribeAttackStatistics.build(context)
83
+ when :describe_drt_access
84
+ Aws::Shield::Endpoints::DescribeDRTAccess.build(context)
85
+ when :describe_emergency_contact_settings
86
+ Aws::Shield::Endpoints::DescribeEmergencyContactSettings.build(context)
87
+ when :describe_protection
88
+ Aws::Shield::Endpoints::DescribeProtection.build(context)
89
+ when :describe_protection_group
90
+ Aws::Shield::Endpoints::DescribeProtectionGroup.build(context)
91
+ when :describe_subscription
92
+ Aws::Shield::Endpoints::DescribeSubscription.build(context)
93
+ when :disable_application_layer_automatic_response
94
+ Aws::Shield::Endpoints::DisableApplicationLayerAutomaticResponse.build(context)
95
+ when :disable_proactive_engagement
96
+ Aws::Shield::Endpoints::DisableProactiveEngagement.build(context)
97
+ when :disassociate_drt_log_bucket
98
+ Aws::Shield::Endpoints::DisassociateDRTLogBucket.build(context)
99
+ when :disassociate_drt_role
100
+ Aws::Shield::Endpoints::DisassociateDRTRole.build(context)
101
+ when :disassociate_health_check
102
+ Aws::Shield::Endpoints::DisassociateHealthCheck.build(context)
103
+ when :enable_application_layer_automatic_response
104
+ Aws::Shield::Endpoints::EnableApplicationLayerAutomaticResponse.build(context)
105
+ when :enable_proactive_engagement
106
+ Aws::Shield::Endpoints::EnableProactiveEngagement.build(context)
107
+ when :get_subscription_state
108
+ Aws::Shield::Endpoints::GetSubscriptionState.build(context)
109
+ when :list_attacks
110
+ Aws::Shield::Endpoints::ListAttacks.build(context)
111
+ when :list_protection_groups
112
+ Aws::Shield::Endpoints::ListProtectionGroups.build(context)
113
+ when :list_protections
114
+ Aws::Shield::Endpoints::ListProtections.build(context)
115
+ when :list_resources_in_protection_group
116
+ Aws::Shield::Endpoints::ListResourcesInProtectionGroup.build(context)
117
+ when :list_tags_for_resource
118
+ Aws::Shield::Endpoints::ListTagsForResource.build(context)
119
+ when :tag_resource
120
+ Aws::Shield::Endpoints::TagResource.build(context)
121
+ when :untag_resource
122
+ Aws::Shield::Endpoints::UntagResource.build(context)
123
+ when :update_application_layer_automatic_response
124
+ Aws::Shield::Endpoints::UpdateApplicationLayerAutomaticResponse.build(context)
125
+ when :update_emergency_contact_settings
126
+ Aws::Shield::Endpoints::UpdateEmergencyContactSettings.build(context)
127
+ when :update_protection_group
128
+ Aws::Shield::Endpoints::UpdateProtectionGroup.build(context)
129
+ when :update_subscription
130
+ Aws::Shield::Endpoints::UpdateSubscription.build(context)
131
+ end
132
+ end
133
+ end
134
+
135
+ def add_handlers(handlers, _config)
136
+ handlers.add(Handler, step: :build, priority: 75)
137
+ end
138
+ end
139
+ end
140
+ end
@@ -636,7 +636,7 @@ module Aws::Shield
636
636
  # * For an Amazon CloudFront distribution:
637
637
  # `arn:aws:cloudfront::account-id:distribution/distribution-id `
638
638
  #
639
- # * For an Global Accelerator accelerator:
639
+ # * For an Global Accelerator standard accelerator:
640
640
  # `arn:aws:globalaccelerator::account-id:accelerator/accelerator-id
641
641
  # `
642
642
  #
@@ -763,7 +763,7 @@ module Aws::Shield
763
763
  end
764
764
 
765
765
  # @!attribute [rw] attack
766
- # The attack that is described.
766
+ # The attack that you requested.
767
767
  # @return [Types::AttackDetail]
768
768
  #
769
769
  # @see http://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttackResponse AWS API Documentation
@@ -781,7 +781,7 @@ module Aws::Shield
781
781
  class DescribeAttackStatisticsRequest < Aws::EmptyStructure; end
782
782
 
783
783
  # @!attribute [rw] time_range
784
- # The time range.
784
+ # The time range of the attack.
785
785
  # @return [Types::TimeRange]
786
786
  #
787
787
  # @!attribute [rw] data_items
@@ -886,17 +886,15 @@ module Aws::Shield
886
886
  # }
887
887
  #
888
888
  # @!attribute [rw] protection_id
889
- # The unique identifier (ID) for the Protection object that is
890
- # described. When submitting the `DescribeProtection` request you must
891
- # provide either the `ResourceArn` or the `ProtectionID`, but not
892
- # both.
889
+ # The unique identifier (ID) for the Protection object to describe.
890
+ # You must provide either the `ResourceArn` of the protected resource
891
+ # or the `ProtectionID` of the protection, but not both.
893
892
  # @return [String]
894
893
  #
895
894
  # @!attribute [rw] resource_arn
896
- # The ARN (Amazon Resource Name) of the Amazon Web Services resource
897
- # for the Protection object that is described. When submitting the
898
- # `DescribeProtection` request you must provide either the
899
- # `ResourceArn` or the `ProtectionID`, but not both.
895
+ # The ARN (Amazon Resource Name) of the protected Amazon Web Services
896
+ # resource. You must provide either the `ResourceArn` of the protected
897
+ # resource or the `ProtectionID` of the protection, but not both.
900
898
  # @return [String]
901
899
  #
902
900
  # @see http://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtectionRequest AWS API Documentation
@@ -909,7 +907,7 @@ module Aws::Shield
909
907
  end
910
908
 
911
909
  # @!attribute [rw] protection
912
- # The Protection object that is described.
910
+ # The Protection that you requested.
913
911
  # @return [Types::Protection]
914
912
  #
915
913
  # @see http://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtectionResponse AWS API Documentation
@@ -946,7 +944,7 @@ module Aws::Shield
946
944
  # }
947
945
  #
948
946
  # @!attribute [rw] resource_arn
949
- # The ARN (Amazon Resource Name) of the resource.
947
+ # The ARN (Amazon Resource Name) of the protected resource.
950
948
  # @return [String]
951
949
  #
952
950
  # @see http://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DisableApplicationLayerAutomaticResponseRequest AWS API Documentation
@@ -1084,7 +1082,7 @@ module Aws::Shield
1084
1082
  # }
1085
1083
  #
1086
1084
  # @!attribute [rw] resource_arn
1087
- # The ARN (Amazon Resource Name) of the resource.
1085
+ # The ARN (Amazon Resource Name) of the protected resource.
1088
1086
  # @return [String]
1089
1087
  #
1090
1088
  # @!attribute [rw] action
@@ -1139,6 +1137,95 @@ module Aws::Shield
1139
1137
  include Aws::Structure
1140
1138
  end
1141
1139
 
1140
+ # Narrows the set of protections that the call retrieves. You can
1141
+ # retrieve a single protection by providing its name or the ARN (Amazon
1142
+ # Resource Name) of its protected resource. You can also retrieve all
1143
+ # protections for a specific resource type. You can provide up to one
1144
+ # criteria per filter type. Shield Advanced returns protections that
1145
+ # exactly match all of the filter criteria that you provide.
1146
+ #
1147
+ # @note When making an API call, you may pass InclusionProtectionFilters
1148
+ # data as a hash:
1149
+ #
1150
+ # {
1151
+ # resource_arns: ["ResourceArn"],
1152
+ # protection_names: ["ProtectionName"],
1153
+ # resource_types: ["CLOUDFRONT_DISTRIBUTION"], # accepts CLOUDFRONT_DISTRIBUTION, ROUTE_53_HOSTED_ZONE, ELASTIC_IP_ALLOCATION, CLASSIC_LOAD_BALANCER, APPLICATION_LOAD_BALANCER, GLOBAL_ACCELERATOR
1154
+ # }
1155
+ #
1156
+ # @!attribute [rw] resource_arns
1157
+ # The ARN (Amazon Resource Name) of the resource whose protection you
1158
+ # want to retrieve.
1159
+ # @return [Array<String>]
1160
+ #
1161
+ # @!attribute [rw] protection_names
1162
+ # The name of the protection that you want to retrieve.
1163
+ # @return [Array<String>]
1164
+ #
1165
+ # @!attribute [rw] resource_types
1166
+ # The type of protected resource whose protections you want to
1167
+ # retrieve.
1168
+ # @return [Array<String>]
1169
+ #
1170
+ # @see http://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/InclusionProtectionFilters AWS API Documentation
1171
+ #
1172
+ class InclusionProtectionFilters < Struct.new(
1173
+ :resource_arns,
1174
+ :protection_names,
1175
+ :resource_types)
1176
+ SENSITIVE = []
1177
+ include Aws::Structure
1178
+ end
1179
+
1180
+ # Narrows the set of protection groups that the call retrieves. You can
1181
+ # retrieve a single protection group by its name and you can retrieve
1182
+ # all protection groups that are configured with a specific pattern,
1183
+ # aggregation, or resource type. You can provide up to one criteria per
1184
+ # filter type. Shield Advanced returns the protection groups that
1185
+ # exactly match all of the search criteria that you provide.
1186
+ #
1187
+ # @note When making an API call, you may pass InclusionProtectionGroupFilters
1188
+ # data as a hash:
1189
+ #
1190
+ # {
1191
+ # protection_group_ids: ["ProtectionGroupId"],
1192
+ # patterns: ["ALL"], # accepts ALL, ARBITRARY, BY_RESOURCE_TYPE
1193
+ # resource_types: ["CLOUDFRONT_DISTRIBUTION"], # accepts CLOUDFRONT_DISTRIBUTION, ROUTE_53_HOSTED_ZONE, ELASTIC_IP_ALLOCATION, CLASSIC_LOAD_BALANCER, APPLICATION_LOAD_BALANCER, GLOBAL_ACCELERATOR
1194
+ # aggregations: ["SUM"], # accepts SUM, MEAN, MAX
1195
+ # }
1196
+ #
1197
+ # @!attribute [rw] protection_group_ids
1198
+ # The ID of the protection group that you want to retrieve.
1199
+ # @return [Array<String>]
1200
+ #
1201
+ # @!attribute [rw] patterns
1202
+ # The pattern specification of the protection groups that you want to
1203
+ # retrieve.
1204
+ # @return [Array<String>]
1205
+ #
1206
+ # @!attribute [rw] resource_types
1207
+ # The resource type configuration of the protection groups that you
1208
+ # want to retrieve. In the protection group configuration, you specify
1209
+ # the resource type when you set the group's `Pattern` to
1210
+ # `BY_RESOURCE_TYPE`.
1211
+ # @return [Array<String>]
1212
+ #
1213
+ # @!attribute [rw] aggregations
1214
+ # The aggregation setting of the protection groups that you want to
1215
+ # retrieve.
1216
+ # @return [Array<String>]
1217
+ #
1218
+ # @see http://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/InclusionProtectionGroupFilters AWS API Documentation
1219
+ #
1220
+ class InclusionProtectionGroupFilters < Struct.new(
1221
+ :protection_group_ids,
1222
+ :patterns,
1223
+ :resource_types,
1224
+ :aggregations)
1225
+ SENSITIVE = []
1226
+ include Aws::Structure
1227
+ end
1228
+
1142
1229
  # Exception that indicates that a problem occurred with the service
1143
1230
  # infrastructure. You can retry the request.
1144
1231
  #
@@ -1386,6 +1473,12 @@ module Aws::Shield
1386
1473
  # {
1387
1474
  # next_token: "Token",
1388
1475
  # max_results: 1,
1476
+ # inclusion_filters: {
1477
+ # protection_group_ids: ["ProtectionGroupId"],
1478
+ # patterns: ["ALL"], # accepts ALL, ARBITRARY, BY_RESOURCE_TYPE
1479
+ # resource_types: ["CLOUDFRONT_DISTRIBUTION"], # accepts CLOUDFRONT_DISTRIBUTION, ROUTE_53_HOSTED_ZONE, ELASTIC_IP_ALLOCATION, CLASSIC_LOAD_BALANCER, APPLICATION_LOAD_BALANCER, GLOBAL_ACCELERATOR
1480
+ # aggregations: ["SUM"], # accepts SUM, MEAN, MAX
1481
+ # },
1389
1482
  # }
1390
1483
  #
1391
1484
  # @!attribute [rw] next_token
@@ -1417,11 +1510,21 @@ module Aws::Shield
1417
1510
  # The default setting is 20.
1418
1511
  # @return [Integer]
1419
1512
  #
1513
+ # @!attribute [rw] inclusion_filters
1514
+ # Narrows the set of protection groups that the call retrieves. You
1515
+ # can retrieve a single protection group by its name and you can
1516
+ # retrieve all protection groups that are configured with specific
1517
+ # pattern or aggregation settings. You can provide up to one criteria
1518
+ # per filter type. Shield Advanced returns the protection groups that
1519
+ # exactly match all of the search criteria that you provide.
1520
+ # @return [Types::InclusionProtectionGroupFilters]
1521
+ #
1420
1522
  # @see http://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtectionGroupsRequest AWS API Documentation
1421
1523
  #
1422
1524
  class ListProtectionGroupsRequest < Struct.new(
1423
1525
  :next_token,
1424
- :max_results)
1526
+ :max_results,
1527
+ :inclusion_filters)
1425
1528
  SENSITIVE = []
1426
1529
  include Aws::Structure
1427
1530
  end
@@ -1461,6 +1564,11 @@ module Aws::Shield
1461
1564
  # {
1462
1565
  # next_token: "Token",
1463
1566
  # max_results: 1,
1567
+ # inclusion_filters: {
1568
+ # resource_arns: ["ResourceArn"],
1569
+ # protection_names: ["ProtectionName"],
1570
+ # resource_types: ["CLOUDFRONT_DISTRIBUTION"], # accepts CLOUDFRONT_DISTRIBUTION, ROUTE_53_HOSTED_ZONE, ELASTIC_IP_ALLOCATION, CLASSIC_LOAD_BALANCER, APPLICATION_LOAD_BALANCER, GLOBAL_ACCELERATOR
1571
+ # },
1464
1572
  # }
1465
1573
  #
1466
1574
  # @!attribute [rw] next_token
@@ -1492,11 +1600,22 @@ module Aws::Shield
1492
1600
  # The default setting is 20.
1493
1601
  # @return [Integer]
1494
1602
  #
1603
+ # @!attribute [rw] inclusion_filters
1604
+ # Narrows the set of protections that the call retrieves. You can
1605
+ # retrieve a single protection by providing its name or the ARN
1606
+ # (Amazon Resource Name) of its protected resource. You can also
1607
+ # retrieve all protections for a specific resource type. You can
1608
+ # provide up to one criteria per filter type. Shield Advanced returns
1609
+ # protections that exactly match all of the filter criteria that you
1610
+ # provide.
1611
+ # @return [Types::InclusionProtectionFilters]
1612
+ #
1495
1613
  # @see http://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtectionsRequest AWS API Documentation
1496
1614
  #
1497
1615
  class ListProtectionsRequest < Struct.new(
1498
1616
  :next_token,
1499
- :max_results)
1617
+ :max_results,
1618
+ :inclusion_filters)
1500
1619
  SENSITIVE = []
1501
1620
  include Aws::Structure
1502
1621
  end
@@ -1678,7 +1797,7 @@ module Aws::Shield
1678
1797
  include Aws::Structure
1679
1798
  end
1680
1799
 
1681
- # The ARN of the role that you specifed does not exist.
1800
+ # The ARN of the role that you specified does not exist.
1682
1801
  #
1683
1802
  # @!attribute [rw] message
1684
1803
  # @return [String]
@@ -1783,7 +1902,7 @@ module Aws::Shield
1783
1902
  # @!attribute [rw] pattern
1784
1903
  # The criteria to use to choose the protected resources for inclusion
1785
1904
  # in the group. You can include all resources that have protections,
1786
- # provide a list of resource Amazon Resource Names (ARNs), or include
1905
+ # provide a list of resource ARNs (Amazon Resource Names), or include
1787
1906
  # all resources of a specified resource type.
1788
1907
  # @return [String]
1789
1908
  #
@@ -1795,7 +1914,7 @@ module Aws::Shield
1795
1914
  # @return [String]
1796
1915
  #
1797
1916
  # @!attribute [rw] members
1798
- # The Amazon Resource Names (ARNs) of the resources to include in the
1917
+ # The ARNs (Amazon Resource Names) of the resources to include in the
1799
1918
  # protection group. You must set this when you set `Pattern` to
1800
1919
  # `ARBITRARY` and you must not set it for any other `Pattern` setting.
1801
1920
  # @return [Array<String>]
@@ -13,9 +13,13 @@ require 'aws-sigv4'
13
13
 
14
14
  require_relative 'aws-sdk-shield/types'
15
15
  require_relative 'aws-sdk-shield/client_api'
16
+ require_relative 'aws-sdk-shield/plugins/endpoints.rb'
16
17
  require_relative 'aws-sdk-shield/client'
17
18
  require_relative 'aws-sdk-shield/errors'
18
19
  require_relative 'aws-sdk-shield/resource'
20
+ require_relative 'aws-sdk-shield/endpoint_parameters'
21
+ require_relative 'aws-sdk-shield/endpoint_provider'
22
+ require_relative 'aws-sdk-shield/endpoints'
19
23
  require_relative 'aws-sdk-shield/customizations'
20
24
 
21
25
  # This module provides support for AWS Shield. This module is available in the
@@ -48,6 +52,6 @@ require_relative 'aws-sdk-shield/customizations'
48
52
  # @!group service
49
53
  module Aws::Shield
50
54
 
51
- GEM_VERSION = '1.48.0'
55
+ GEM_VERSION = '1.50.0'
52
56
 
53
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-shield
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.48.0
4
+ version: 1.50.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-02-24 00:00:00.000000000 Z
11
+ date: 2022-10-25 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-shield/client.rb
60
60
  - lib/aws-sdk-shield/client_api.rb
61
61
  - lib/aws-sdk-shield/customizations.rb
62
+ - lib/aws-sdk-shield/endpoint_parameters.rb
63
+ - lib/aws-sdk-shield/endpoint_provider.rb
64
+ - lib/aws-sdk-shield/endpoints.rb
62
65
  - lib/aws-sdk-shield/errors.rb
66
+ - lib/aws-sdk-shield/plugins/endpoints.rb
63
67
  - lib/aws-sdk-shield/resource.rb
64
68
  - lib/aws-sdk-shield/types.rb
65
69
  homepage: https://github.com/aws/aws-sdk-ruby