aws-sdk-shield 1.0.0.rc2

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,318 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module Shield
10
+ # @api private
11
+ module ClientApi
12
+
13
+ include Seahorse::Model
14
+
15
+ AttackDetail = Shapes::StructureShape.new(name: 'AttackDetail')
16
+ AttackId = Shapes::StringShape.new(name: 'AttackId')
17
+ AttackSummaries = Shapes::ListShape.new(name: 'AttackSummaries')
18
+ AttackSummary = Shapes::StructureShape.new(name: 'AttackSummary')
19
+ AttackTimestamp = Shapes::TimestampShape.new(name: 'AttackTimestamp')
20
+ AttackVectorDescription = Shapes::StructureShape.new(name: 'AttackVectorDescription')
21
+ AttackVectorDescriptionList = Shapes::ListShape.new(name: 'AttackVectorDescriptionList')
22
+ CreateProtectionRequest = Shapes::StructureShape.new(name: 'CreateProtectionRequest')
23
+ CreateProtectionResponse = Shapes::StructureShape.new(name: 'CreateProtectionResponse')
24
+ CreateSubscriptionRequest = Shapes::StructureShape.new(name: 'CreateSubscriptionRequest')
25
+ CreateSubscriptionResponse = Shapes::StructureShape.new(name: 'CreateSubscriptionResponse')
26
+ DeleteProtectionRequest = Shapes::StructureShape.new(name: 'DeleteProtectionRequest')
27
+ DeleteProtectionResponse = Shapes::StructureShape.new(name: 'DeleteProtectionResponse')
28
+ DeleteSubscriptionRequest = Shapes::StructureShape.new(name: 'DeleteSubscriptionRequest')
29
+ DeleteSubscriptionResponse = Shapes::StructureShape.new(name: 'DeleteSubscriptionResponse')
30
+ DescribeAttackRequest = Shapes::StructureShape.new(name: 'DescribeAttackRequest')
31
+ DescribeAttackResponse = Shapes::StructureShape.new(name: 'DescribeAttackResponse')
32
+ DescribeProtectionRequest = Shapes::StructureShape.new(name: 'DescribeProtectionRequest')
33
+ DescribeProtectionResponse = Shapes::StructureShape.new(name: 'DescribeProtectionResponse')
34
+ DescribeSubscriptionRequest = Shapes::StructureShape.new(name: 'DescribeSubscriptionRequest')
35
+ DescribeSubscriptionResponse = Shapes::StructureShape.new(name: 'DescribeSubscriptionResponse')
36
+ Double = Shapes::FloatShape.new(name: 'Double')
37
+ DurationInSeconds = Shapes::IntegerShape.new(name: 'DurationInSeconds')
38
+ Integer = Shapes::IntegerShape.new(name: 'Integer')
39
+ InternalErrorException = Shapes::StructureShape.new(name: 'InternalErrorException')
40
+ InvalidOperationException = Shapes::StructureShape.new(name: 'InvalidOperationException')
41
+ InvalidParameterException = Shapes::StructureShape.new(name: 'InvalidParameterException')
42
+ InvalidResourceException = Shapes::StructureShape.new(name: 'InvalidResourceException')
43
+ LimitNumber = Shapes::IntegerShape.new(name: 'LimitNumber')
44
+ LimitType = Shapes::StringShape.new(name: 'LimitType')
45
+ LimitsExceededException = Shapes::StructureShape.new(name: 'LimitsExceededException')
46
+ ListAttacksRequest = Shapes::StructureShape.new(name: 'ListAttacksRequest')
47
+ ListAttacksResponse = Shapes::StructureShape.new(name: 'ListAttacksResponse')
48
+ ListProtectionsRequest = Shapes::StructureShape.new(name: 'ListProtectionsRequest')
49
+ ListProtectionsResponse = Shapes::StructureShape.new(name: 'ListProtectionsResponse')
50
+ LockedSubscriptionException = Shapes::StructureShape.new(name: 'LockedSubscriptionException')
51
+ MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
52
+ Mitigation = Shapes::StructureShape.new(name: 'Mitigation')
53
+ MitigationList = Shapes::ListShape.new(name: 'MitigationList')
54
+ OptimisticLockException = Shapes::StructureShape.new(name: 'OptimisticLockException')
55
+ Protection = Shapes::StructureShape.new(name: 'Protection')
56
+ ProtectionId = Shapes::StringShape.new(name: 'ProtectionId')
57
+ ProtectionName = Shapes::StringShape.new(name: 'ProtectionName')
58
+ Protections = Shapes::ListShape.new(name: 'Protections')
59
+ ResourceAlreadyExistsException = Shapes::StructureShape.new(name: 'ResourceAlreadyExistsException')
60
+ ResourceArn = Shapes::StringShape.new(name: 'ResourceArn')
61
+ ResourceArnFilterList = Shapes::ListShape.new(name: 'ResourceArnFilterList')
62
+ ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
63
+ String = Shapes::StringShape.new(name: 'String')
64
+ SubResourceSummary = Shapes::StructureShape.new(name: 'SubResourceSummary')
65
+ SubResourceSummaryList = Shapes::ListShape.new(name: 'SubResourceSummaryList')
66
+ SubResourceType = Shapes::StringShape.new(name: 'SubResourceType')
67
+ Subscription = Shapes::StructureShape.new(name: 'Subscription')
68
+ SummarizedAttackVector = Shapes::StructureShape.new(name: 'SummarizedAttackVector')
69
+ SummarizedAttackVectorList = Shapes::ListShape.new(name: 'SummarizedAttackVectorList')
70
+ SummarizedCounter = Shapes::StructureShape.new(name: 'SummarizedCounter')
71
+ SummarizedCounterList = Shapes::ListShape.new(name: 'SummarizedCounterList')
72
+ TimeRange = Shapes::StructureShape.new(name: 'TimeRange')
73
+ Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
74
+ Token = Shapes::StringShape.new(name: 'Token')
75
+ errorMessage = Shapes::StringShape.new(name: 'errorMessage')
76
+
77
+ AttackDetail.add_member(:attack_id, Shapes::ShapeRef.new(shape: AttackId, location_name: "AttackId"))
78
+ AttackDetail.add_member(:resource_arn, Shapes::ShapeRef.new(shape: ResourceArn, location_name: "ResourceArn"))
79
+ AttackDetail.add_member(:sub_resources, Shapes::ShapeRef.new(shape: SubResourceSummaryList, location_name: "SubResources"))
80
+ AttackDetail.add_member(:start_time, Shapes::ShapeRef.new(shape: AttackTimestamp, location_name: "StartTime"))
81
+ AttackDetail.add_member(:end_time, Shapes::ShapeRef.new(shape: AttackTimestamp, location_name: "EndTime"))
82
+ AttackDetail.add_member(:attack_counters, Shapes::ShapeRef.new(shape: SummarizedCounterList, location_name: "AttackCounters"))
83
+ AttackDetail.add_member(:mitigations, Shapes::ShapeRef.new(shape: MitigationList, location_name: "Mitigations"))
84
+ AttackDetail.struct_class = Types::AttackDetail
85
+
86
+ AttackSummaries.member = Shapes::ShapeRef.new(shape: AttackSummary)
87
+
88
+ AttackSummary.add_member(:attack_id, Shapes::ShapeRef.new(shape: String, location_name: "AttackId"))
89
+ AttackSummary.add_member(:resource_arn, Shapes::ShapeRef.new(shape: String, location_name: "ResourceArn"))
90
+ AttackSummary.add_member(:start_time, Shapes::ShapeRef.new(shape: AttackTimestamp, location_name: "StartTime"))
91
+ AttackSummary.add_member(:end_time, Shapes::ShapeRef.new(shape: AttackTimestamp, location_name: "EndTime"))
92
+ AttackSummary.add_member(:attack_vectors, Shapes::ShapeRef.new(shape: AttackVectorDescriptionList, location_name: "AttackVectors"))
93
+ AttackSummary.struct_class = Types::AttackSummary
94
+
95
+ AttackVectorDescription.add_member(:vector_type, Shapes::ShapeRef.new(shape: String, required: true, location_name: "VectorType"))
96
+ AttackVectorDescription.struct_class = Types::AttackVectorDescription
97
+
98
+ AttackVectorDescriptionList.member = Shapes::ShapeRef.new(shape: AttackVectorDescription)
99
+
100
+ CreateProtectionRequest.add_member(:name, Shapes::ShapeRef.new(shape: ProtectionName, required: true, location_name: "Name"))
101
+ CreateProtectionRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: ResourceArn, required: true, location_name: "ResourceArn"))
102
+ CreateProtectionRequest.struct_class = Types::CreateProtectionRequest
103
+
104
+ CreateProtectionResponse.add_member(:protection_id, Shapes::ShapeRef.new(shape: ProtectionId, location_name: "ProtectionId"))
105
+ CreateProtectionResponse.struct_class = Types::CreateProtectionResponse
106
+
107
+ CreateSubscriptionRequest.struct_class = Types::CreateSubscriptionRequest
108
+
109
+ CreateSubscriptionResponse.struct_class = Types::CreateSubscriptionResponse
110
+
111
+ DeleteProtectionRequest.add_member(:protection_id, Shapes::ShapeRef.new(shape: ProtectionId, required: true, location_name: "ProtectionId"))
112
+ DeleteProtectionRequest.struct_class = Types::DeleteProtectionRequest
113
+
114
+ DeleteProtectionResponse.struct_class = Types::DeleteProtectionResponse
115
+
116
+ DeleteSubscriptionRequest.struct_class = Types::DeleteSubscriptionRequest
117
+
118
+ DeleteSubscriptionResponse.struct_class = Types::DeleteSubscriptionResponse
119
+
120
+ DescribeAttackRequest.add_member(:attack_id, Shapes::ShapeRef.new(shape: AttackId, required: true, location_name: "AttackId"))
121
+ DescribeAttackRequest.struct_class = Types::DescribeAttackRequest
122
+
123
+ DescribeAttackResponse.add_member(:attack, Shapes::ShapeRef.new(shape: AttackDetail, location_name: "Attack"))
124
+ DescribeAttackResponse.struct_class = Types::DescribeAttackResponse
125
+
126
+ DescribeProtectionRequest.add_member(:protection_id, Shapes::ShapeRef.new(shape: ProtectionId, required: true, location_name: "ProtectionId"))
127
+ DescribeProtectionRequest.struct_class = Types::DescribeProtectionRequest
128
+
129
+ DescribeProtectionResponse.add_member(:protection, Shapes::ShapeRef.new(shape: Protection, location_name: "Protection"))
130
+ DescribeProtectionResponse.struct_class = Types::DescribeProtectionResponse
131
+
132
+ DescribeSubscriptionRequest.struct_class = Types::DescribeSubscriptionRequest
133
+
134
+ DescribeSubscriptionResponse.add_member(:subscription, Shapes::ShapeRef.new(shape: Subscription, location_name: "Subscription"))
135
+ DescribeSubscriptionResponse.struct_class = Types::DescribeSubscriptionResponse
136
+
137
+ ListAttacksRequest.add_member(:resource_arns, Shapes::ShapeRef.new(shape: ResourceArnFilterList, location_name: "ResourceArns"))
138
+ ListAttacksRequest.add_member(:start_time, Shapes::ShapeRef.new(shape: TimeRange, location_name: "StartTime"))
139
+ ListAttacksRequest.add_member(:end_time, Shapes::ShapeRef.new(shape: TimeRange, location_name: "EndTime"))
140
+ ListAttacksRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: Token, location_name: "NextToken"))
141
+ ListAttacksRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
142
+ ListAttacksRequest.struct_class = Types::ListAttacksRequest
143
+
144
+ ListAttacksResponse.add_member(:attack_summaries, Shapes::ShapeRef.new(shape: AttackSummaries, location_name: "AttackSummaries"))
145
+ ListAttacksResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: Token, location_name: "NextToken"))
146
+ ListAttacksResponse.struct_class = Types::ListAttacksResponse
147
+
148
+ ListProtectionsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: Token, location_name: "NextToken"))
149
+ ListProtectionsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
150
+ ListProtectionsRequest.struct_class = Types::ListProtectionsRequest
151
+
152
+ ListProtectionsResponse.add_member(:protections, Shapes::ShapeRef.new(shape: Protections, location_name: "Protections"))
153
+ ListProtectionsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: Token, location_name: "NextToken"))
154
+ ListProtectionsResponse.struct_class = Types::ListProtectionsResponse
155
+
156
+ Mitigation.add_member(:mitigation_name, Shapes::ShapeRef.new(shape: String, location_name: "MitigationName"))
157
+ Mitigation.struct_class = Types::Mitigation
158
+
159
+ MitigationList.member = Shapes::ShapeRef.new(shape: Mitigation)
160
+
161
+ Protection.add_member(:id, Shapes::ShapeRef.new(shape: ProtectionId, location_name: "Id"))
162
+ Protection.add_member(:name, Shapes::ShapeRef.new(shape: ProtectionName, location_name: "Name"))
163
+ Protection.add_member(:resource_arn, Shapes::ShapeRef.new(shape: ResourceArn, location_name: "ResourceArn"))
164
+ Protection.struct_class = Types::Protection
165
+
166
+ Protections.member = Shapes::ShapeRef.new(shape: Protection)
167
+
168
+ ResourceArnFilterList.member = Shapes::ShapeRef.new(shape: ResourceArn)
169
+
170
+ SubResourceSummary.add_member(:type, Shapes::ShapeRef.new(shape: SubResourceType, location_name: "Type"))
171
+ SubResourceSummary.add_member(:id, Shapes::ShapeRef.new(shape: String, location_name: "Id"))
172
+ SubResourceSummary.add_member(:attack_vectors, Shapes::ShapeRef.new(shape: SummarizedAttackVectorList, location_name: "AttackVectors"))
173
+ SubResourceSummary.add_member(:counters, Shapes::ShapeRef.new(shape: SummarizedCounterList, location_name: "Counters"))
174
+ SubResourceSummary.struct_class = Types::SubResourceSummary
175
+
176
+ SubResourceSummaryList.member = Shapes::ShapeRef.new(shape: SubResourceSummary)
177
+
178
+ Subscription.add_member(:start_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "StartTime"))
179
+ Subscription.add_member(:time_commitment_in_seconds, Shapes::ShapeRef.new(shape: DurationInSeconds, location_name: "TimeCommitmentInSeconds"))
180
+ Subscription.struct_class = Types::Subscription
181
+
182
+ SummarizedAttackVector.add_member(:vector_type, Shapes::ShapeRef.new(shape: String, required: true, location_name: "VectorType"))
183
+ SummarizedAttackVector.add_member(:vector_counters, Shapes::ShapeRef.new(shape: SummarizedCounterList, location_name: "VectorCounters"))
184
+ SummarizedAttackVector.struct_class = Types::SummarizedAttackVector
185
+
186
+ SummarizedAttackVectorList.member = Shapes::ShapeRef.new(shape: SummarizedAttackVector)
187
+
188
+ SummarizedCounter.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "Name"))
189
+ SummarizedCounter.add_member(:max, Shapes::ShapeRef.new(shape: Double, location_name: "Max"))
190
+ SummarizedCounter.add_member(:average, Shapes::ShapeRef.new(shape: Double, location_name: "Average"))
191
+ SummarizedCounter.add_member(:sum, Shapes::ShapeRef.new(shape: Double, location_name: "Sum"))
192
+ SummarizedCounter.add_member(:n, Shapes::ShapeRef.new(shape: Integer, location_name: "N"))
193
+ SummarizedCounter.add_member(:unit, Shapes::ShapeRef.new(shape: String, location_name: "Unit"))
194
+ SummarizedCounter.struct_class = Types::SummarizedCounter
195
+
196
+ SummarizedCounterList.member = Shapes::ShapeRef.new(shape: SummarizedCounter)
197
+
198
+ TimeRange.add_member(:from_inclusive, Shapes::ShapeRef.new(shape: AttackTimestamp, location_name: "FromInclusive"))
199
+ TimeRange.add_member(:to_exclusive, Shapes::ShapeRef.new(shape: AttackTimestamp, location_name: "ToExclusive"))
200
+ TimeRange.struct_class = Types::TimeRange
201
+
202
+
203
+ # @api private
204
+ API = Seahorse::Model::Api.new.tap do |api|
205
+
206
+ api.version = "2016-06-02"
207
+
208
+ api.metadata = {
209
+ "endpointPrefix" => "shield",
210
+ "jsonVersion" => "1.1",
211
+ "protocol" => "json",
212
+ "serviceFullName" => "AWS Shield",
213
+ "signatureVersion" => "v4",
214
+ "targetPrefix" => "AWSShield_20160616",
215
+ }
216
+
217
+ api.add_operation(:create_protection, Seahorse::Model::Operation.new.tap do |o|
218
+ o.name = "CreateProtection"
219
+ o.http_method = "POST"
220
+ o.http_request_uri = "/"
221
+ o.input = Shapes::ShapeRef.new(shape: CreateProtectionRequest)
222
+ o.output = Shapes::ShapeRef.new(shape: CreateProtectionResponse)
223
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
224
+ o.errors << Shapes::ShapeRef.new(shape: InvalidResourceException)
225
+ o.errors << Shapes::ShapeRef.new(shape: InvalidOperationException)
226
+ o.errors << Shapes::ShapeRef.new(shape: LimitsExceededException)
227
+ o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsException)
228
+ o.errors << Shapes::ShapeRef.new(shape: OptimisticLockException)
229
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
230
+ end)
231
+
232
+ api.add_operation(:create_subscription, Seahorse::Model::Operation.new.tap do |o|
233
+ o.name = "CreateSubscription"
234
+ o.http_method = "POST"
235
+ o.http_request_uri = "/"
236
+ o.input = Shapes::ShapeRef.new(shape: CreateSubscriptionRequest)
237
+ o.output = Shapes::ShapeRef.new(shape: CreateSubscriptionResponse)
238
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
239
+ o.errors << Shapes::ShapeRef.new(shape: ResourceAlreadyExistsException)
240
+ end)
241
+
242
+ api.add_operation(:delete_protection, Seahorse::Model::Operation.new.tap do |o|
243
+ o.name = "DeleteProtection"
244
+ o.http_method = "POST"
245
+ o.http_request_uri = "/"
246
+ o.input = Shapes::ShapeRef.new(shape: DeleteProtectionRequest)
247
+ o.output = Shapes::ShapeRef.new(shape: DeleteProtectionResponse)
248
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
249
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
250
+ o.errors << Shapes::ShapeRef.new(shape: OptimisticLockException)
251
+ end)
252
+
253
+ api.add_operation(:delete_subscription, Seahorse::Model::Operation.new.tap do |o|
254
+ o.name = "DeleteSubscription"
255
+ o.http_method = "POST"
256
+ o.http_request_uri = "/"
257
+ o.input = Shapes::ShapeRef.new(shape: DeleteSubscriptionRequest)
258
+ o.output = Shapes::ShapeRef.new(shape: DeleteSubscriptionResponse)
259
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
260
+ o.errors << Shapes::ShapeRef.new(shape: LockedSubscriptionException)
261
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
262
+ end)
263
+
264
+ api.add_operation(:describe_attack, Seahorse::Model::Operation.new.tap do |o|
265
+ o.name = "DescribeAttack"
266
+ o.http_method = "POST"
267
+ o.http_request_uri = "/"
268
+ o.input = Shapes::ShapeRef.new(shape: DescribeAttackRequest)
269
+ o.output = Shapes::ShapeRef.new(shape: DescribeAttackResponse)
270
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
271
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
272
+ end)
273
+
274
+ api.add_operation(:describe_protection, Seahorse::Model::Operation.new.tap do |o|
275
+ o.name = "DescribeProtection"
276
+ o.http_method = "POST"
277
+ o.http_request_uri = "/"
278
+ o.input = Shapes::ShapeRef.new(shape: DescribeProtectionRequest)
279
+ o.output = Shapes::ShapeRef.new(shape: DescribeProtectionResponse)
280
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
281
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
282
+ end)
283
+
284
+ api.add_operation(:describe_subscription, Seahorse::Model::Operation.new.tap do |o|
285
+ o.name = "DescribeSubscription"
286
+ o.http_method = "POST"
287
+ o.http_request_uri = "/"
288
+ o.input = Shapes::ShapeRef.new(shape: DescribeSubscriptionRequest)
289
+ o.output = Shapes::ShapeRef.new(shape: DescribeSubscriptionResponse)
290
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
291
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
292
+ end)
293
+
294
+ api.add_operation(:list_attacks, Seahorse::Model::Operation.new.tap do |o|
295
+ o.name = "ListAttacks"
296
+ o.http_method = "POST"
297
+ o.http_request_uri = "/"
298
+ o.input = Shapes::ShapeRef.new(shape: ListAttacksRequest)
299
+ o.output = Shapes::ShapeRef.new(shape: ListAttacksResponse)
300
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
301
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
302
+ o.errors << Shapes::ShapeRef.new(shape: InvalidOperationException)
303
+ end)
304
+
305
+ api.add_operation(:list_protections, Seahorse::Model::Operation.new.tap do |o|
306
+ o.name = "ListProtections"
307
+ o.http_method = "POST"
308
+ o.http_request_uri = "/"
309
+ o.input = Shapes::ShapeRef.new(shape: ListProtectionsRequest)
310
+ o.output = Shapes::ShapeRef.new(shape: ListProtectionsResponse)
311
+ o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
312
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
313
+ end)
314
+ end
315
+
316
+ end
317
+ end
318
+ end
File without changes
@@ -0,0 +1,23 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module Shield
10
+ module Errors
11
+
12
+ extend Aws::Errors::DynamicErrors
13
+
14
+ # Raised when calling #load or #data on a resource class that can not be
15
+ # loaded. This can happen when:
16
+ #
17
+ # * A resource class has identifiers, but no data attributes.
18
+ # * Resource data is only available when making an API call that
19
+ # enumerates all resources of that type.
20
+ class ResourceNotLoadable < RuntimeError; end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,25 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module Shield
10
+ class Resource
11
+
12
+ # @param options ({})
13
+ # @option options [Client] :client
14
+ def initialize(options = {})
15
+ @client = options[:client] || Client.new(options)
16
+ end
17
+
18
+ # @return [Client]
19
+ def client
20
+ @client
21
+ end
22
+
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,448 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws
9
+ module Shield
10
+ module Types
11
+
12
+ # The details of a DDoS attack.
13
+ # @!attribute [rw] attack_id
14
+ # The unique identifier (ID) of the attack.
15
+ # @return [String]
16
+ #
17
+ # @!attribute [rw] resource_arn
18
+ # The ARN (Amazon Resource Name) of the resource that was attacked.
19
+ # @return [String]
20
+ #
21
+ # @!attribute [rw] sub_resources
22
+ # If applicable, additional detail about the resource being attacked,
23
+ # for example, IP address or URL.
24
+ # @return [Array<Types::SubResourceSummary>]
25
+ #
26
+ # @!attribute [rw] start_time
27
+ # The time the attack started, in the format 2016-12-16T13:50Z.
28
+ # @return [Time]
29
+ #
30
+ # @!attribute [rw] end_time
31
+ # The time the attack ended, in the format 2016-12-16T13:50Z.
32
+ # @return [Time]
33
+ #
34
+ # @!attribute [rw] attack_counters
35
+ # List of counters that describe the attack for the specified time
36
+ # period.
37
+ # @return [Array<Types::SummarizedCounter>]
38
+ #
39
+ # @!attribute [rw] mitigations
40
+ # List of mitigation actions taken for the attack.
41
+ # @return [Array<Types::Mitigation>]
42
+ class AttackDetail < Struct.new(
43
+ :attack_id,
44
+ :resource_arn,
45
+ :sub_resources,
46
+ :start_time,
47
+ :end_time,
48
+ :attack_counters,
49
+ :mitigations)
50
+ include Aws::Structure
51
+ end
52
+
53
+ # Summarizes all DDoS attacks for a specified time period.
54
+ # @!attribute [rw] attack_id
55
+ # The unique identifier (ID) of the attack.
56
+ # @return [String]
57
+ #
58
+ # @!attribute [rw] resource_arn
59
+ # The ARN (Amazon Resource Name) of the resource that was attacked.
60
+ # @return [String]
61
+ #
62
+ # @!attribute [rw] start_time
63
+ # The start time of the attack, in the format 2016-12-16T13:50Z.
64
+ # @return [Time]
65
+ #
66
+ # @!attribute [rw] end_time
67
+ # The end time of the attack, in the format 2016-12-16T13:50Z.
68
+ # @return [Time]
69
+ #
70
+ # @!attribute [rw] attack_vectors
71
+ # The list of attacks for a specified time period.
72
+ # @return [Array<Types::AttackVectorDescription>]
73
+ class AttackSummary < Struct.new(
74
+ :attack_id,
75
+ :resource_arn,
76
+ :start_time,
77
+ :end_time,
78
+ :attack_vectors)
79
+ include Aws::Structure
80
+ end
81
+
82
+ # Describes the attack.
83
+ # @!attribute [rw] vector_type
84
+ # The attack type, for example, SNMP reflection or SYN flood.
85
+ # @return [String]
86
+ class AttackVectorDescription < Struct.new(
87
+ :vector_type)
88
+ include Aws::Structure
89
+ end
90
+
91
+ # @note When making an API call, pass CreateProtectionRequest
92
+ # data as a hash:
93
+ #
94
+ # {
95
+ # name: "ProtectionName", # required
96
+ # resource_arn: "ResourceArn", # required
97
+ # }
98
+ # @!attribute [rw] name
99
+ # Friendly name for the `Protection` you are creating.
100
+ # @return [String]
101
+ #
102
+ # @!attribute [rw] resource_arn
103
+ # The ARN (Amazon Resource Name) of the resource to be protected.
104
+ # @return [String]
105
+ class CreateProtectionRequest < Struct.new(
106
+ :name,
107
+ :resource_arn)
108
+ include Aws::Structure
109
+ end
110
+
111
+ # @!attribute [rw] protection_id
112
+ # The unique identifier (ID) for the Protection object that is
113
+ # created.
114
+ # @return [String]
115
+ class CreateProtectionResponse < Struct.new(
116
+ :protection_id)
117
+ include Aws::Structure
118
+ end
119
+
120
+ # @api private
121
+ class CreateSubscriptionRequest < Aws::EmptyStructure; end
122
+
123
+ class CreateSubscriptionResponse < Aws::EmptyStructure; end
124
+
125
+ # @note When making an API call, pass DeleteProtectionRequest
126
+ # data as a hash:
127
+ #
128
+ # {
129
+ # protection_id: "ProtectionId", # required
130
+ # }
131
+ # @!attribute [rw] protection_id
132
+ # The unique identifier (ID) for the Protection object to be deleted.
133
+ # @return [String]
134
+ class DeleteProtectionRequest < Struct.new(
135
+ :protection_id)
136
+ include Aws::Structure
137
+ end
138
+
139
+ class DeleteProtectionResponse < Aws::EmptyStructure; end
140
+
141
+ # @api private
142
+ class DeleteSubscriptionRequest < Aws::EmptyStructure; end
143
+
144
+ class DeleteSubscriptionResponse < Aws::EmptyStructure; end
145
+
146
+ # @note When making an API call, pass DescribeAttackRequest
147
+ # data as a hash:
148
+ #
149
+ # {
150
+ # attack_id: "AttackId", # required
151
+ # }
152
+ # @!attribute [rw] attack_id
153
+ # The unique identifier (ID) for the attack that to be described.
154
+ # @return [String]
155
+ class DescribeAttackRequest < Struct.new(
156
+ :attack_id)
157
+ include Aws::Structure
158
+ end
159
+
160
+ # @!attribute [rw] attack
161
+ # The attack that is described.
162
+ # @return [Types::AttackDetail]
163
+ class DescribeAttackResponse < Struct.new(
164
+ :attack)
165
+ include Aws::Structure
166
+ end
167
+
168
+ # @note When making an API call, pass DescribeProtectionRequest
169
+ # data as a hash:
170
+ #
171
+ # {
172
+ # protection_id: "ProtectionId", # required
173
+ # }
174
+ # @!attribute [rw] protection_id
175
+ # The unique identifier (ID) for the Protection object that is
176
+ # described.
177
+ # @return [String]
178
+ class DescribeProtectionRequest < Struct.new(
179
+ :protection_id)
180
+ include Aws::Structure
181
+ end
182
+
183
+ # @!attribute [rw] protection
184
+ # The Protection object that is described.
185
+ # @return [Types::Protection]
186
+ class DescribeProtectionResponse < Struct.new(
187
+ :protection)
188
+ include Aws::Structure
189
+ end
190
+
191
+ # @api private
192
+ class DescribeSubscriptionRequest < Aws::EmptyStructure; end
193
+
194
+ # @!attribute [rw] subscription
195
+ # The AWS Shield Advanced subscription details for an account.
196
+ # @return [Types::Subscription]
197
+ class DescribeSubscriptionResponse < Struct.new(
198
+ :subscription)
199
+ include Aws::Structure
200
+ end
201
+
202
+ # @note When making an API call, pass ListAttacksRequest
203
+ # data as a hash:
204
+ #
205
+ # {
206
+ # resource_arns: ["ResourceArn"],
207
+ # start_time: {
208
+ # from_inclusive: Time.now,
209
+ # to_exclusive: Time.now,
210
+ # },
211
+ # end_time: {
212
+ # from_inclusive: Time.now,
213
+ # to_exclusive: Time.now,
214
+ # },
215
+ # next_token: "Token",
216
+ # max_results: 1,
217
+ # }
218
+ # @!attribute [rw] resource_arns
219
+ # The ARN (Amazon Resource Name) of the resource that was attacked. If
220
+ # this is left blank, all applicable resources for this account will
221
+ # be included.
222
+ # @return [Array<String>]
223
+ #
224
+ # @!attribute [rw] start_time
225
+ # The time period for the attacks.
226
+ # @return [Types::TimeRange]
227
+ #
228
+ # @!attribute [rw] end_time
229
+ # The end of the time period for the attacks.
230
+ # @return [Types::TimeRange]
231
+ #
232
+ # @!attribute [rw] next_token
233
+ # The `ListAttacksRequest.NextMarker` value from a previous call to
234
+ # `ListAttacksRequest`. Pass null if this is the first call.
235
+ # @return [String]
236
+ #
237
+ # @!attribute [rw] max_results
238
+ # The maximum number of AttackSummary objects to be returned. If this
239
+ # is left blank, the first 20 results will be returned.
240
+ # @return [Integer]
241
+ class ListAttacksRequest < Struct.new(
242
+ :resource_arns,
243
+ :start_time,
244
+ :end_time,
245
+ :next_token,
246
+ :max_results)
247
+ include Aws::Structure
248
+ end
249
+
250
+ # @!attribute [rw] attack_summaries
251
+ # The attack information for the specified time range.
252
+ # @return [Array<Types::AttackSummary>]
253
+ #
254
+ # @!attribute [rw] next_token
255
+ # The token returned by a previous call to indicate that there is more
256
+ # data available. If not null, more results are available. Pass this
257
+ # value for the `NextMarker` parameter in a subsequent call to
258
+ # `ListAttacks` to retrieve the next set of items.
259
+ # @return [String]
260
+ class ListAttacksResponse < Struct.new(
261
+ :attack_summaries,
262
+ :next_token)
263
+ include Aws::Structure
264
+ end
265
+
266
+ # @note When making an API call, pass ListProtectionsRequest
267
+ # data as a hash:
268
+ #
269
+ # {
270
+ # next_token: "Token",
271
+ # max_results: 1,
272
+ # }
273
+ # @!attribute [rw] next_token
274
+ # The `ListProtectionsRequest.NextToken` value from a previous call to
275
+ # `ListProtections`. Pass null if this is the first call.
276
+ # @return [String]
277
+ #
278
+ # @!attribute [rw] max_results
279
+ # The maximum number of Protection objects to be returned. If this is
280
+ # left blank the first 20 results will be returned.
281
+ # @return [Integer]
282
+ class ListProtectionsRequest < Struct.new(
283
+ :next_token,
284
+ :max_results)
285
+ include Aws::Structure
286
+ end
287
+
288
+ # @!attribute [rw] protections
289
+ # The array of enabled Protection objects.
290
+ # @return [Array<Types::Protection>]
291
+ #
292
+ # @!attribute [rw] next_token
293
+ # If you specify a value for `MaxResults` and you have more
294
+ # Protections than the value of MaxResults, AWS Shield Advanced
295
+ # returns a NextToken value in the response that allows you to list
296
+ # another group of Protections. For the second and subsequent
297
+ # ListProtections requests, specify the value of NextToken from the
298
+ # previous response to get information about another batch of
299
+ # Protections.
300
+ # @return [String]
301
+ class ListProtectionsResponse < Struct.new(
302
+ :protections,
303
+ :next_token)
304
+ include Aws::Structure
305
+ end
306
+
307
+ # The mitigation applied to a DDoS attack.
308
+ # @!attribute [rw] mitigation_name
309
+ # The name of the mitigation taken for this attack.
310
+ # @return [String]
311
+ class Mitigation < Struct.new(
312
+ :mitigation_name)
313
+ include Aws::Structure
314
+ end
315
+
316
+ # An object that represents a resource that is under DDoS protection.
317
+ # @!attribute [rw] id
318
+ # The unique identifier (ID) of the protection.
319
+ # @return [String]
320
+ #
321
+ # @!attribute [rw] name
322
+ # The friendly name of the protection. For example, `My CloudFront
323
+ # distributions`.
324
+ # @return [String]
325
+ #
326
+ # @!attribute [rw] resource_arn
327
+ # The ARN (Amazon Resource Name) of the AWS resource that is
328
+ # protected.
329
+ # @return [String]
330
+ class Protection < Struct.new(
331
+ :id,
332
+ :name,
333
+ :resource_arn)
334
+ include Aws::Structure
335
+ end
336
+
337
+ # The attack information for the specified SubResource.
338
+ # @!attribute [rw] type
339
+ # The `SubResource` type.
340
+ # @return [String]
341
+ #
342
+ # @!attribute [rw] id
343
+ # The unique identifier (ID) of the `SubResource`.
344
+ # @return [String]
345
+ #
346
+ # @!attribute [rw] attack_vectors
347
+ # The list of attack types and associated counters.
348
+ # @return [Array<Types::SummarizedAttackVector>]
349
+ #
350
+ # @!attribute [rw] counters
351
+ # The counters that describe the details of the attack.
352
+ # @return [Array<Types::SummarizedCounter>]
353
+ class SubResourceSummary < Struct.new(
354
+ :type,
355
+ :id,
356
+ :attack_vectors,
357
+ :counters)
358
+ include Aws::Structure
359
+ end
360
+
361
+ # Information about the AWS Shield Advanced subscription for an account.
362
+ # @!attribute [rw] start_time
363
+ # The start time of the subscription, in the format
364
+ # "2016-12-16T13:50Z".
365
+ # @return [Time]
366
+ #
367
+ # @!attribute [rw] time_commitment_in_seconds
368
+ # The length, in seconds, of the AWS Shield Advanced subscription for
369
+ # the account.
370
+ # @return [Integer]
371
+ class Subscription < Struct.new(
372
+ :start_time,
373
+ :time_commitment_in_seconds)
374
+ include Aws::Structure
375
+ end
376
+
377
+ # A summary of information about the attack.
378
+ # @!attribute [rw] vector_type
379
+ # The attack type, for example, SNMP reflection or SYN flood.
380
+ # @return [String]
381
+ #
382
+ # @!attribute [rw] vector_counters
383
+ # The list of counters that describe the details of the attack.
384
+ # @return [Array<Types::SummarizedCounter>]
385
+ class SummarizedAttackVector < Struct.new(
386
+ :vector_type,
387
+ :vector_counters)
388
+ include Aws::Structure
389
+ end
390
+
391
+ # The counter that describes a DDoS attack.
392
+ # @!attribute [rw] name
393
+ # The counter name.
394
+ # @return [String]
395
+ #
396
+ # @!attribute [rw] max
397
+ # The maximum value of the counter for a specified time period.
398
+ # @return [Float]
399
+ #
400
+ # @!attribute [rw] average
401
+ # The average value of the counter for a specified time period.
402
+ # @return [Float]
403
+ #
404
+ # @!attribute [rw] sum
405
+ # The total of counter values for a specified time period.
406
+ # @return [Float]
407
+ #
408
+ # @!attribute [rw] n
409
+ # The number of counters for a specified time period.
410
+ # @return [Integer]
411
+ #
412
+ # @!attribute [rw] unit
413
+ # The unit of the counters.
414
+ # @return [String]
415
+ class SummarizedCounter < Struct.new(
416
+ :name,
417
+ :max,
418
+ :average,
419
+ :sum,
420
+ :n,
421
+ :unit)
422
+ include Aws::Structure
423
+ end
424
+
425
+ # The time range.
426
+ # @note When making an API call, pass TimeRange
427
+ # data as a hash:
428
+ #
429
+ # {
430
+ # from_inclusive: Time.now,
431
+ # to_exclusive: Time.now,
432
+ # }
433
+ # @!attribute [rw] from_inclusive
434
+ # The start time, in the format 2016-12-16T13:50Z.
435
+ # @return [Time]
436
+ #
437
+ # @!attribute [rw] to_exclusive
438
+ # The end time, in the format 2016-12-16T15:50Z.
439
+ # @return [Time]
440
+ class TimeRange < Struct.new(
441
+ :from_inclusive,
442
+ :to_exclusive)
443
+ include Aws::Structure
444
+ end
445
+
446
+ end
447
+ end
448
+ end