aws-sdk-core 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/apis/CloudFormation.resources.json +150 -0
- data/apis/EC2.resources.json +93 -0
- data/apis/S3.api.json +1 -1
- data/apis/S3.resources.json +77 -0
- data/apis/SQS.resources.json +12 -0
- data/lib/aws-sdk-core.rb +7 -8
- data/lib/aws-sdk-core/client_paging.rb +3 -1
- data/lib/aws-sdk-core/client_waiters.rb +1 -1
- data/lib/aws-sdk-core/cloudformation.rb +1 -0
- data/lib/aws-sdk-core/pageable_response.rb +0 -2
- data/lib/aws-sdk-core/paging/pager.rb +4 -2
- data/lib/aws-sdk-core/plugins/s3_region_detection.rb +4 -17
- data/lib/aws-sdk-core/version.rb +1 -1
- data/lib/aws-sdk-core/waiters/errors.rb +0 -2
- data/lib/aws-sdk-core/waiters/waiter.rb +2 -2
- data/lib/seahorse/client/base.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 71145cbff6dcace64034b04f8cdf0029543398f5
|
|
4
|
+
data.tar.gz: 1a3870c6828d9d128aa162fc23beffed947446fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c047ffd9255f311f4dc76043c41c133a35e3e0eeee823c6a69192d6c5ddeb1f0a86ee0bf393faaf060dc5f559a38d645ac8bac9448631e89ad4a80ede7931229
|
|
7
|
+
data.tar.gz: 6861935b6fa7de9e8e6857497f613ee2b02ba355fbc90466742ba90aab780bdb5bca137164686ff283a95470a28de0a2ea3f1b88447081d941669330e7d61bd4
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"service": {
|
|
3
|
+
"hasMany": {
|
|
4
|
+
"Stacks": {
|
|
5
|
+
"request": { "operation": "DescribeStacks" },
|
|
6
|
+
"resource": {
|
|
7
|
+
"type":"Stack",
|
|
8
|
+
"identifiers": [
|
|
9
|
+
{ "target": "Name", "sourceType": "responsePath", "source":"Stacks[].StackName" }
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"actions": {
|
|
16
|
+
"CreateStack": {
|
|
17
|
+
"request": { "operation": "CreateStack" },
|
|
18
|
+
"resource": {
|
|
19
|
+
"type": "Stack",
|
|
20
|
+
"identifiers": [
|
|
21
|
+
{"target": "Name", "sourceType": "requestParameter", "source":"StackName" }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
"resources": {
|
|
29
|
+
"Stack": {
|
|
30
|
+
"shape":"Stack",
|
|
31
|
+
"identifiers": [ {"name":"Name"} ],
|
|
32
|
+
"load": {
|
|
33
|
+
"request": {
|
|
34
|
+
"operation": "DescribeStacks",
|
|
35
|
+
"params": [
|
|
36
|
+
{ "target":"StackName", "sourceType":"identifier", "source":"Name" }
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"path": "Stacks[0]"
|
|
40
|
+
},
|
|
41
|
+
"actions": {
|
|
42
|
+
|
|
43
|
+
"Update": {
|
|
44
|
+
"request": {
|
|
45
|
+
"operation": "UpdateStack",
|
|
46
|
+
"params": [
|
|
47
|
+
{ "target":"StackName", "sourceType":"identifier", "source":"Name" }
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
"CancelUpdate": {
|
|
53
|
+
"request": {
|
|
54
|
+
"operation": "CancelUpdateStack",
|
|
55
|
+
"params": [
|
|
56
|
+
{ "target":"StackName", "sourceType":"identifier", "source":"Name" }
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
"Delete": {
|
|
62
|
+
"request": {
|
|
63
|
+
"operation": "DeleteStack",
|
|
64
|
+
"params": [
|
|
65
|
+
{ "target":"StackName", "sourceType":"identifier", "source":"Name" }
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
"subResources": {
|
|
72
|
+
"resources": ["StackResource"],
|
|
73
|
+
"identifiers": {"Name": "StackName"}
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
"hasMany": {
|
|
77
|
+
"ResourceSummaries": {
|
|
78
|
+
"request": {
|
|
79
|
+
"operation": "ListStackResources",
|
|
80
|
+
"params": [
|
|
81
|
+
{ "target":"StackName", "sourceType":"identifier", "source":"Name" }
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"resource": {
|
|
85
|
+
"type": "StackResourceSummary",
|
|
86
|
+
"identifiers": [
|
|
87
|
+
{ "target":"LogicalId", "sourceType":"responsePath", "source":"StackResourceSummaries[].LogicalResourceId" },
|
|
88
|
+
{ "target":"StackName", "sourceType":"requestParameter", "source":"StackName" }
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"path": "StackResourceSummaries[]"
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
"Events": {
|
|
95
|
+
"request": {
|
|
96
|
+
"operation": "DescribeStackEvents",
|
|
97
|
+
"params": [
|
|
98
|
+
{ "target":"StackName", "sourceType":"identifier", "source":"Name" }
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"resource": {
|
|
102
|
+
"type":"Event",
|
|
103
|
+
"identifiers": [
|
|
104
|
+
{ "target": "Id", "sourceType": "responsePath", "source": "StackEvents[].EventId"}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"path": "StackEvents[]"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
"StackResource" : {
|
|
113
|
+
"identifiers": [{"name": "LogicalId"}, {"name": "StackName"}],
|
|
114
|
+
"shape": "StackResourceDetail",
|
|
115
|
+
"load": {
|
|
116
|
+
"request": {
|
|
117
|
+
"operation": "DescribeStackResource",
|
|
118
|
+
"params": [
|
|
119
|
+
{ "target":"LogicalResourceId", "sourceType": "identifier", "source": "LogicalId" },
|
|
120
|
+
{ "target":"StackName", "sourceType": "identifier", "source": "StackName" }
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"path": "StackResourceDetail"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
"StackResourceSummary": {
|
|
128
|
+
"identifiers": [{"name": "LogicalId"}, {"name": "StackName"}],
|
|
129
|
+
"shape": "StackResourceSummary",
|
|
130
|
+
|
|
131
|
+
"hasOne": {
|
|
132
|
+
"Resource": {
|
|
133
|
+
"resource": {
|
|
134
|
+
"type": "StackResource",
|
|
135
|
+
"identifiers": [
|
|
136
|
+
{ "target":"LogicalId", "sourceType":"identifier", "source":"LogicalId" },
|
|
137
|
+
{ "target":"StackName", "sourceType":"identifier", "source":"StackName" }
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
"Event": {
|
|
146
|
+
"identifiers": [{"name": "Id"}],
|
|
147
|
+
"shape": "StackEvent"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
data/apis/EC2.resources.json
CHANGED
|
@@ -508,6 +508,87 @@
|
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
},
|
|
511
|
+
"batchActions": {
|
|
512
|
+
"CreateTags": {
|
|
513
|
+
"request": {
|
|
514
|
+
"operation": "CreateTags",
|
|
515
|
+
"params": [
|
|
516
|
+
{ "target":"Resources[]", "sourceType":"identifier", "source":"Id" }
|
|
517
|
+
]
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"Monitor": {
|
|
521
|
+
"request": {
|
|
522
|
+
"operation": "MonitorInstances",
|
|
523
|
+
"params": [
|
|
524
|
+
{ "target":"InstanceIds[]", "sourceType":"identifier", "source":"Id" }
|
|
525
|
+
]
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"Start": {
|
|
529
|
+
"request": {
|
|
530
|
+
"operation": "StartInstances",
|
|
531
|
+
"params": [
|
|
532
|
+
{ "target":"InstanceIds[]", "sourceType":"identifier", "source":"Id" }
|
|
533
|
+
]
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"Stop": {
|
|
537
|
+
"request": {
|
|
538
|
+
"operation": "StopInstances",
|
|
539
|
+
"params": [
|
|
540
|
+
{ "target":"InstanceIds[]", "sourceType":"identifier", "source":"Id" }
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"Reboot": {
|
|
545
|
+
"request": {
|
|
546
|
+
"operation": "RebootInstances",
|
|
547
|
+
"params": [
|
|
548
|
+
{ "target":"InstanceIds[]", "sourceType":"identifier", "source":"Id" }
|
|
549
|
+
]
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
"Terminate": {
|
|
553
|
+
"request": {
|
|
554
|
+
"operation": "TerminateInstances",
|
|
555
|
+
"params": [
|
|
556
|
+
{ "target":"InstanceIds[]", "sourceType":"identifier", "source":"Id" }
|
|
557
|
+
]
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
"Unmonitor": {
|
|
561
|
+
"request": {
|
|
562
|
+
"operation": "UnmonitorInstances",
|
|
563
|
+
"params": [
|
|
564
|
+
{ "target":"InstanceIds[]", "sourceType":"identifier", "source":"Id" }
|
|
565
|
+
]
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"waiters": {
|
|
570
|
+
"Stopped": {
|
|
571
|
+
"waiterName": "InstanceStopped",
|
|
572
|
+
"params": [
|
|
573
|
+
{ "target":"InstanceIds[]", "sourceType":"identifier", "source":"Id" }
|
|
574
|
+
],
|
|
575
|
+
"path": "Reservations[0].Instances[0]"
|
|
576
|
+
},
|
|
577
|
+
"Running": {
|
|
578
|
+
"waiterName": "InstanceRunning",
|
|
579
|
+
"params": [
|
|
580
|
+
{ "target":"InstanceIds[]", "sourceType":"identifier", "source":"Id" }
|
|
581
|
+
],
|
|
582
|
+
"path": "Reservations[0].Instances[0]"
|
|
583
|
+
},
|
|
584
|
+
"Terminated": {
|
|
585
|
+
"waiterName": "InstanceTerminated",
|
|
586
|
+
"params": [
|
|
587
|
+
{ "target":"InstanceIds[]", "sourceType":"identifier", "source":"Id" }
|
|
588
|
+
],
|
|
589
|
+
"path": "Reservations[0].Instances[0]"
|
|
590
|
+
}
|
|
591
|
+
},
|
|
511
592
|
"hasOne": {
|
|
512
593
|
"Subnet": {
|
|
513
594
|
"resource": {
|
|
@@ -1891,6 +1972,18 @@
|
|
|
1891
1972
|
]
|
|
1892
1973
|
}
|
|
1893
1974
|
}
|
|
1975
|
+
},
|
|
1976
|
+
"batchActions": {
|
|
1977
|
+
"Delete": {
|
|
1978
|
+
"request": {
|
|
1979
|
+
"operation": "DeleteTags",
|
|
1980
|
+
"params": [
|
|
1981
|
+
{ "target":"Resources[]", "sourceType":"identifier", "source":"ResourceId" },
|
|
1982
|
+
{ "target":"Tags[*].Key", "sourceType":"identifier", "source":"Key" },
|
|
1983
|
+
{ "target":"Tags[*].Value", "sourceType":"identifier", "source":"Value" }
|
|
1984
|
+
]
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1894
1987
|
}
|
|
1895
1988
|
}
|
|
1896
1989
|
}
|
data/apis/S3.api.json
CHANGED
data/apis/S3.resources.json
CHANGED
|
@@ -101,6 +101,23 @@
|
|
|
101
101
|
]
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
|
+
"ObjectVersions": {
|
|
105
|
+
"request": {
|
|
106
|
+
"operation": "ListObjectVersions",
|
|
107
|
+
"params": [
|
|
108
|
+
{ "target":"Bucket", "sourceType":"identifier", "source":"Name" }
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"resource": {
|
|
112
|
+
"type": "ObjectVersion",
|
|
113
|
+
"identifiers": [
|
|
114
|
+
{ "target":"BucketName", "sourceType":"identifier", "source":"Name" },
|
|
115
|
+
{ "target":"ObjectKey", "sourceType":"responsePath", "source":"[Versions,DeleteMarkers]|[].Key" },
|
|
116
|
+
{ "target":"Id", "sourceType":"responsePath", "source":"[Versions,DeleteMarkers]|[].VersionId" }
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"path":"[Versions,DeleteMarkers]|[]"
|
|
120
|
+
},
|
|
104
121
|
"MultipartUploads": {
|
|
105
122
|
"request": {
|
|
106
123
|
"operation":"ListMultipartUploads",
|
|
@@ -472,6 +489,13 @@
|
|
|
472
489
|
{ "target":"Key", "sourceType":"identifier", "source":"ObjectKey" },
|
|
473
490
|
{ "target":"UploadId", "sourceType":"identifier", "source":"Id" }
|
|
474
491
|
]
|
|
492
|
+
},
|
|
493
|
+
"resource": {
|
|
494
|
+
"type": "Object",
|
|
495
|
+
"identifiers": [
|
|
496
|
+
{ "target":"BucketName", "sourceType":"identifier", "source":"BucketName" },
|
|
497
|
+
{ "target":"Key", "sourceType":"identifier", "source":"ObjectKey" }
|
|
498
|
+
]
|
|
475
499
|
}
|
|
476
500
|
},
|
|
477
501
|
"Parts": {
|
|
@@ -608,6 +632,7 @@
|
|
|
608
632
|
"subResources": {
|
|
609
633
|
"resources": [
|
|
610
634
|
"ObjectAcl",
|
|
635
|
+
"ObjectVersion",
|
|
611
636
|
"MultipartUpload"
|
|
612
637
|
],
|
|
613
638
|
"identifiers": {
|
|
@@ -643,6 +668,58 @@
|
|
|
643
668
|
}
|
|
644
669
|
}
|
|
645
670
|
}
|
|
671
|
+
},
|
|
672
|
+
"ObjectVersion": {
|
|
673
|
+
"identifiers": [
|
|
674
|
+
{ "name": "BucketName" },
|
|
675
|
+
{ "name": "ObjectKey" },
|
|
676
|
+
{ "name": "Id" }
|
|
677
|
+
],
|
|
678
|
+
"shape": "ObjectVersion",
|
|
679
|
+
"actions": {
|
|
680
|
+
"Delete": {
|
|
681
|
+
"request": {
|
|
682
|
+
"operation": "DeleteObject",
|
|
683
|
+
"params": [
|
|
684
|
+
{ "target":"Bucket", "sourceType":"identifier", "source":"BucketName" },
|
|
685
|
+
{ "target":"Key", "sourceType":"identifier", "source":"ObjectKey" },
|
|
686
|
+
{ "target":"VersionId", "sourceType":"identifier", "source":"Id" }
|
|
687
|
+
]
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
"batchActions": {
|
|
692
|
+
"Get": {
|
|
693
|
+
"request": {
|
|
694
|
+
"operation": "GetObject",
|
|
695
|
+
"params": [
|
|
696
|
+
{ "target":"Bucket", "sourceType":"identifier", "source":"BucketName" },
|
|
697
|
+
{ "target":"Key", "sourceType":"identifier", "source":"ObjectKey" },
|
|
698
|
+
{ "target":"VersionId", "sourceType":"identifier", "source":"Id" }
|
|
699
|
+
]
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
"Head": {
|
|
703
|
+
"request": {
|
|
704
|
+
"operation": "HeadObject",
|
|
705
|
+
"params": [
|
|
706
|
+
{ "target":"Bucket", "sourceType":"identifier", "source":"BucketName" },
|
|
707
|
+
{ "target":"Key", "sourceType":"identifier", "source":"ObjectKey" },
|
|
708
|
+
{ "target":"VersionId", "sourceType":"identifier", "source":"Id" }
|
|
709
|
+
]
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
"Delete": {
|
|
713
|
+
"request": {
|
|
714
|
+
"operation": "DeleteObjects",
|
|
715
|
+
"params": [
|
|
716
|
+
{ "target":"Bucket", "sourceType":"identifier", "source":"BucketName" },
|
|
717
|
+
{ "target":"Delete.Objects[*].Key", "sourceType":"identifier", "source":"ObjectKey" },
|
|
718
|
+
{ "target":"Delete.Objects[*].VersionId", "sourceType":"identifier", "source":"Id" }
|
|
719
|
+
]
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
646
723
|
}
|
|
647
724
|
}
|
|
648
725
|
}
|
data/apis/SQS.resources.json
CHANGED
|
@@ -169,6 +169,18 @@
|
|
|
169
169
|
]
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
+
},
|
|
173
|
+
"batchActions": {
|
|
174
|
+
"Delete": {
|
|
175
|
+
"request": {
|
|
176
|
+
"operation":"DeleteMessageBatch",
|
|
177
|
+
"params": [
|
|
178
|
+
{ "target":"QueueUrl", "sourceType":"identifier", "source":"QueueUrl" },
|
|
179
|
+
{ "target":"Entries[*].Id", "sourceType":"dataMember", "source":"MessageId" },
|
|
180
|
+
{ "target":"Entries[*].ReceiptHandle", "sourceType":"identifier", "source":"ReceiptHandle" }
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
}
|
|
172
184
|
}
|
|
173
185
|
}
|
|
174
186
|
}
|
data/lib/aws-sdk-core.rb
CHANGED
|
@@ -226,20 +226,19 @@ module Aws
|
|
|
226
226
|
# Aws.add_service('SvcName',
|
|
227
227
|
# api: '/path/to/svc.api.json',
|
|
228
228
|
# paginators: '/path/to/svc.paginators.json',
|
|
229
|
+
# waiters: '/path/to/svc.waiters.json',
|
|
229
230
|
# resources: '/path/to/svc.resources.json')
|
|
230
231
|
#
|
|
231
232
|
# Aws::SvcName::Client.new
|
|
232
233
|
# #=> #<Aws::SvcName::Client>
|
|
233
234
|
#
|
|
234
235
|
# @param [String] svc_name The name of the service. This will also be
|
|
235
|
-
# the namespace under {Aws}.
|
|
236
|
-
# @option options[
|
|
237
|
-
# @option options[String,Hash,Paging::Provider] :paginators
|
|
238
|
-
# @option options[String] :
|
|
239
|
-
# @
|
|
240
|
-
# @
|
|
241
|
-
# @yieldparam [Hash<String,String>] svc_files
|
|
242
|
-
# @return [Module<Service>]
|
|
236
|
+
# the namespace under {Aws}. This must be a valid constant name.
|
|
237
|
+
# @option options[String,Pathname,Hash,Seahorse::Model::Api,nil] :api
|
|
238
|
+
# @option options[String,Pathname,Hash,Paging::Provider,nil] :paginators
|
|
239
|
+
# @option options[String,Pathname,Hash,Waiters::Provider,nil] :waiters
|
|
240
|
+
# @option options[String,Pathname,Hash,Resources::Definition,nil] :resources
|
|
241
|
+
# @return [Module<Service>] Returns the new service module.
|
|
243
242
|
def add_service(svc_name, options = {})
|
|
244
243
|
svc_module = Module.new { extend Service }
|
|
245
244
|
const_set(svc_name, svc_module)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'pathname'
|
|
2
|
+
|
|
1
3
|
module Aws
|
|
2
4
|
# @api private
|
|
3
5
|
module ClientPaging
|
|
@@ -13,7 +15,7 @@ module Aws
|
|
|
13
15
|
@paginators = case paginators
|
|
14
16
|
when Paging::Provider then paginators
|
|
15
17
|
when Hash then Paging::Provider.new(paginators)
|
|
16
|
-
when String then Paging::Provider.new(Aws.load_json(paginators))
|
|
18
|
+
when String, Pathname then Paging::Provider.new(Aws.load_json(paginators))
|
|
17
19
|
when nil then Paging::NullProvider.new
|
|
18
20
|
else raise ArgumentError, 'invalid paginators'
|
|
19
21
|
end
|
|
@@ -10,7 +10,7 @@ module Aws
|
|
|
10
10
|
case waiters
|
|
11
11
|
when Waiters::Provider then waiters
|
|
12
12
|
when Hash then Waiters::Provider.new(waiters)
|
|
13
|
-
when String then Waiters::Provider.new(Aws.load_json(waiters))
|
|
13
|
+
when String, Pathname then Waiters::Provider.new(Aws.load_json(waiters))
|
|
14
14
|
when nil then Waiters::NullProvider.new
|
|
15
15
|
else raise ArgumentError, 'invalid waiters'
|
|
16
16
|
end
|
|
@@ -2,4 +2,5 @@ Aws.add_service(:CloudFormation, {
|
|
|
2
2
|
api: File.join(Aws::API_DIR, 'CloudFormation.api.json'),
|
|
3
3
|
docs: File.join(Aws::API_DIR, 'CloudFormation.docs.json'),
|
|
4
4
|
paginators: File.join(Aws::API_DIR, 'CloudFormation.paginators.json'),
|
|
5
|
+
resources: File.join(Aws::API_DIR, 'CloudFormation.resources.json'),
|
|
5
6
|
})
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'jmespath'
|
|
2
|
+
|
|
1
3
|
module Aws
|
|
2
4
|
module Paging
|
|
3
5
|
class Pager
|
|
@@ -19,7 +21,7 @@ module Aws
|
|
|
19
21
|
# @return [Hash]
|
|
20
22
|
def next_tokens(response)
|
|
21
23
|
@tokens.each.with_object({}) do |(source, target), next_tokens|
|
|
22
|
-
value =
|
|
24
|
+
value = JMESPath.search(source, response.data)
|
|
23
25
|
next_tokens[target.to_sym] = value unless value.nil?
|
|
24
26
|
end
|
|
25
27
|
end
|
|
@@ -28,7 +30,7 @@ module Aws
|
|
|
28
30
|
# @return [Boolean]
|
|
29
31
|
def truncated?(response)
|
|
30
32
|
if @more_results
|
|
31
|
-
|
|
33
|
+
JMESPath.search(@more_results, response.data)
|
|
32
34
|
else
|
|
33
35
|
!next_tokens(response).empty?
|
|
34
36
|
end
|
|
@@ -23,7 +23,7 @@ module Aws
|
|
|
23
23
|
if region == 'us-east-1'
|
|
24
24
|
"#{bucket}.s3-external-1.amazonaws.com"
|
|
25
25
|
else
|
|
26
|
-
|
|
26
|
+
bucket + '.' + URI.parse(EndpointProvider.resolve(region, 's3')).host
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -45,8 +45,7 @@ module Aws
|
|
|
45
45
|
if cached_region && cached_region != context.config.region
|
|
46
46
|
context.http_request.endpoint.host = new_hostname(context, cached_region)
|
|
47
47
|
context[:sigv4_region] = cached_region
|
|
48
|
-
context[:signature_version] =
|
|
49
|
-
S3.sigv2_region?(cached_region) ? 's3' : 'v4'
|
|
48
|
+
context[:signature_version] = 'v4'
|
|
50
49
|
end
|
|
51
50
|
end
|
|
52
51
|
|
|
@@ -66,10 +65,7 @@ module Aws
|
|
|
66
65
|
detect_region_and_retry(response)
|
|
67
66
|
elsif wrong_sigv4_region?(response)
|
|
68
67
|
extract_body_region_and_retry(response.context)
|
|
69
|
-
|
|
70
|
-
# region detection not supported for 301 moved permanently
|
|
71
|
-
# when using path style
|
|
72
|
-
detect_region_and_retry(response) else
|
|
68
|
+
else
|
|
73
69
|
response
|
|
74
70
|
end
|
|
75
71
|
end
|
|
@@ -85,10 +81,6 @@ module Aws
|
|
|
85
81
|
resp.context.http_response.body_contents.match(/<Region>.+?<\/Region>/)
|
|
86
82
|
end
|
|
87
83
|
|
|
88
|
-
def moved_permanently?(resp)
|
|
89
|
-
resp.context.http_response.status_code == 301
|
|
90
|
-
end
|
|
91
|
-
|
|
92
84
|
def extract_body_region_and_retry(context)
|
|
93
85
|
actual_region = region_from_body(context)
|
|
94
86
|
updgrade_to_v4(context, actual_region)
|
|
@@ -120,14 +112,9 @@ module Aws
|
|
|
120
112
|
signer.sign(context.http_request)
|
|
121
113
|
end
|
|
122
114
|
|
|
123
|
-
def dns_style?(context)
|
|
124
|
-
bucket = context.params[:bucket]
|
|
125
|
-
context.http_request.endpoint.host.match(/^#{Regexp.escape(bucket)}\.s3/)
|
|
126
|
-
end
|
|
127
|
-
|
|
128
115
|
def region_from_location_header(context)
|
|
129
116
|
location = context.http_response.headers['location']
|
|
130
|
-
location.match(/s3
|
|
117
|
+
location.match(/s3.(.+?)\.amazonaws\.com/)[1]
|
|
131
118
|
end
|
|
132
119
|
|
|
133
120
|
def log_warning(context, actual_region)
|
data/lib/aws-sdk-core/version.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require '
|
|
1
|
+
require 'jmespath'
|
|
2
2
|
|
|
3
3
|
module Aws
|
|
4
4
|
module Waiters
|
|
@@ -150,7 +150,7 @@ module Aws
|
|
|
150
150
|
if resp.error
|
|
151
151
|
false
|
|
152
152
|
elsif path
|
|
153
|
-
output_value_matches?(value,
|
|
153
|
+
output_value_matches?(value, JMESPath.search(path, resp.data))
|
|
154
154
|
else
|
|
155
155
|
true
|
|
156
156
|
end
|
data/lib/seahorse/client/base.rb
CHANGED
|
@@ -184,7 +184,7 @@ module Seahorse
|
|
|
184
184
|
when nil then Model::Api.new({})
|
|
185
185
|
when Model::Api then api
|
|
186
186
|
when Hash then Model::Api.new(api)
|
|
187
|
-
when String then Model::Api.new(Util.load_json(api))
|
|
187
|
+
when String, Pathname then Model::Api.new(Util.load_json(api))
|
|
188
188
|
else raise ArgumentError, "invalid api definition #{api}"
|
|
189
189
|
end
|
|
190
190
|
define_operation_methods
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aws-sdk-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.6
|
|
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: 2014-10-
|
|
11
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: multi_json
|
|
@@ -53,19 +53,19 @@ dependencies:
|
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '3.0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
56
|
+
name: jmespath
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- -
|
|
59
|
+
- - ~>
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 0
|
|
61
|
+
version: '1.0'
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- -
|
|
66
|
+
- - ~>
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 0
|
|
68
|
+
version: '1.0'
|
|
69
69
|
description: Provides API clients for AWS.
|
|
70
70
|
email:
|
|
71
71
|
executables:
|
|
@@ -249,6 +249,7 @@ files:
|
|
|
249
249
|
- apis/AutoScaling.paginators.json
|
|
250
250
|
- apis/CloudFormation.api.json
|
|
251
251
|
- apis/CloudFormation.paginators.json
|
|
252
|
+
- apis/CloudFormation.resources.json
|
|
252
253
|
- apis/CloudFront.api.json
|
|
253
254
|
- apis/CloudFront.paginators.json
|
|
254
255
|
- apis/CloudFront.waiters.json
|