aws-sdk-core 2.1.7 → 2.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54b407bdb17f322f2b25d8ccbcaccc317fb182f5
4
- data.tar.gz: 44222c367e970b769991226aefd268bb793a2c37
3
+ metadata.gz: 3e2c63d82dd0755ce9e83a5446505f7c4a5072a5
4
+ data.tar.gz: b9be39379887028208bc9e77f5ed360aef7d1d37
5
5
  SHA512:
6
- metadata.gz: 41cd7dbbf8ee5259adf48958fc283539a475128c70068953ff981dee039e2dad535109df0ce112dbee3b2ff7700368ff90ba4edb410fcfe5f6b49a64bece7cc0
7
- data.tar.gz: d284806817f0623121f5fab398e8a2d4e3268d45b8f945ac41a83d013c4a05ea9d9200dedb07d4a5fa6caa705bb841a0ec2a84ae19a67cda0522a1f5630d5bec
6
+ metadata.gz: df5d024f546b13790019d796224a9e8ec9e759efd6965fe9e600a35d20e24ba317b325b12bc50058b3f73720575046b3a2ad152706411c2dca65de82c153aaaa
7
+ data.tar.gz: cc5e494592b478de4396503fdccded16c993beae26e1ec2c92f51db2cd5eb302c0ce8bd7a4077c84c3c4172d85c7c4cf9ef99bbed005671f8f5dec9b0af6de6e
@@ -3154,10 +3154,6 @@
3154
3154
  "VpcPeeringConnectionId":{
3155
3155
  "shape":"String",
3156
3156
  "locationName":"vpcPeeringConnectionId"
3157
- },
3158
- "ClientToken":{
3159
- "shape":"String",
3160
- "locationName":"clientToken"
3161
3157
  }
3162
3158
  }
3163
3159
  },
@@ -3167,10 +3163,6 @@
3167
3163
  "Return":{
3168
3164
  "shape":"Boolean",
3169
3165
  "locationName":"return"
3170
- },
3171
- "ClientToken":{
3172
- "shape":"String",
3173
- "locationName":"clientToken"
3174
3166
  }
3175
3167
  }
3176
3168
  },
@@ -7933,7 +7925,7 @@
7933
7925
  "LaunchSpecsList":{
7934
7926
  "type":"list",
7935
7927
  "member":{
7936
- "shape":"LaunchSpecification",
7928
+ "shape":"SpotFleetLaunchSpecification",
7937
7929
  "locationName":"item"
7938
7930
  },
7939
7931
  "min":1
@@ -8108,10 +8100,6 @@
8108
8100
  }
8109
8101
  }
8110
8102
  },
8111
- "ModifySnapshotAttributeName":{
8112
- "type":"string",
8113
- "enum":["createVolumePermission"]
8114
- },
8115
8103
  "ModifySnapshotAttributeRequest":{
8116
8104
  "type":"structure",
8117
8105
  "required":["SnapshotId"],
@@ -8121,7 +8109,7 @@
8121
8109
  "locationName":"dryRun"
8122
8110
  },
8123
8111
  "SnapshotId":{"shape":"String"},
8124
- "Attribute":{"shape":"ModifySnapshotAttributeName"},
8112
+ "Attribute":{"shape":"SnapshotAttributeName"},
8125
8113
  "OperationType":{"shape":"String"},
8126
8114
  "UserIds":{
8127
8115
  "shape":"UserIdStringList",
@@ -9823,7 +9811,7 @@
9823
9811
  "locationName":"dryRun"
9824
9812
  },
9825
9813
  "SnapshotId":{"shape":"String"},
9826
- "Attribute":{"shape":"ModifySnapshotAttributeName"}
9814
+ "Attribute":{"shape":"SnapshotAttributeName"}
9827
9815
  }
9828
9816
  },
9829
9817
  "ResourceIdList":{
@@ -10452,6 +10440,80 @@
10452
10440
  }
10453
10441
  }
10454
10442
  },
10443
+ "SpotFleetLaunchSpecification":{
10444
+ "type":"structure",
10445
+ "members":{
10446
+ "ImageId":{
10447
+ "shape":"String",
10448
+ "locationName":"imageId"
10449
+ },
10450
+ "KeyName":{
10451
+ "shape":"String",
10452
+ "locationName":"keyName"
10453
+ },
10454
+ "SecurityGroups":{
10455
+ "shape":"GroupIdentifierList",
10456
+ "locationName":"groupSet"
10457
+ },
10458
+ "UserData":{
10459
+ "shape":"String",
10460
+ "locationName":"userData"
10461
+ },
10462
+ "AddressingType":{
10463
+ "shape":"String",
10464
+ "locationName":"addressingType"
10465
+ },
10466
+ "InstanceType":{
10467
+ "shape":"InstanceType",
10468
+ "locationName":"instanceType"
10469
+ },
10470
+ "Placement":{
10471
+ "shape":"SpotPlacement",
10472
+ "locationName":"placement"
10473
+ },
10474
+ "KernelId":{
10475
+ "shape":"String",
10476
+ "locationName":"kernelId"
10477
+ },
10478
+ "RamdiskId":{
10479
+ "shape":"String",
10480
+ "locationName":"ramdiskId"
10481
+ },
10482
+ "BlockDeviceMappings":{
10483
+ "shape":"BlockDeviceMappingList",
10484
+ "locationName":"blockDeviceMapping"
10485
+ },
10486
+ "Monitoring":{
10487
+ "shape":"SpotFleetMonitoring",
10488
+ "locationName":"monitoring"
10489
+ },
10490
+ "SubnetId":{
10491
+ "shape":"String",
10492
+ "locationName":"subnetId"
10493
+ },
10494
+ "NetworkInterfaces":{
10495
+ "shape":"InstanceNetworkInterfaceSpecificationList",
10496
+ "locationName":"networkInterfaceSet"
10497
+ },
10498
+ "IamInstanceProfile":{
10499
+ "shape":"IamInstanceProfileSpecification",
10500
+ "locationName":"iamInstanceProfile"
10501
+ },
10502
+ "EbsOptimized":{
10503
+ "shape":"Boolean",
10504
+ "locationName":"ebsOptimized"
10505
+ }
10506
+ }
10507
+ },
10508
+ "SpotFleetMonitoring":{
10509
+ "type":"structure",
10510
+ "members":{
10511
+ "Enabled":{
10512
+ "shape":"Boolean",
10513
+ "locationName":"enabled"
10514
+ }
10515
+ }
10516
+ },
10455
10517
  "SpotFleetRequestConfig":{
10456
10518
  "type":"structure",
10457
10519
  "required":[
@@ -1,4 +1,5 @@
1
1
  {
2
+ "version":"2.0",
2
3
  "metadata":{
3
4
  "apiVersion":"2009-03-31",
4
5
  "endpointPrefix":"elasticmapreduce",
@@ -451,6 +452,7 @@
451
452
  "LogUri":{"shape":"String"},
452
453
  "RequestedAmiVersion":{"shape":"String"},
453
454
  "RunningAmiVersion":{"shape":"String"},
455
+ "ReleaseLabel":{"shape":"String"},
454
456
  "AutoTerminate":{"shape":"Boolean"},
455
457
  "TerminationProtected":{"shape":"Boolean"},
456
458
  "VisibleToAllUsers":{"shape":"Boolean"},
@@ -458,7 +460,8 @@
458
460
  "Tags":{"shape":"TagList"},
459
461
  "ServiceRole":{"shape":"String"},
460
462
  "NormalizedInstanceHours":{"shape":"Integer"},
461
- "MasterPublicDnsName":{"shape":"String"}
463
+ "MasterPublicDnsName":{"shape":"String"},
464
+ "Configurations":{"shape":"ConfigurationList"}
462
465
  }
463
466
  },
464
467
  "ClusterId":{"type":"string"},
@@ -538,6 +541,18 @@
538
541
  "type":"list",
539
542
  "member":{"shape":"Command"}
540
543
  },
544
+ "Configuration":{
545
+ "type":"structure",
546
+ "members":{
547
+ "Classification":{"shape":"String"},
548
+ "Configurations":{"shape":"ConfigurationList"},
549
+ "Properties":{"shape":"StringMap"}
550
+ }
551
+ },
552
+ "ConfigurationList":{
553
+ "type":"list",
554
+ "member":{"shape":"Configuration"}
555
+ },
541
556
  "Date":{"type":"timestamp"},
542
557
  "DescribeClusterInput":{
543
558
  "type":"structure",
@@ -649,7 +664,8 @@
649
664
  "InstanceType":{"shape":"InstanceType"},
650
665
  "RequestedInstanceCount":{"shape":"Integer"},
651
666
  "RunningInstanceCount":{"shape":"Integer"},
652
- "Status":{"shape":"InstanceGroupStatus"}
667
+ "Status":{"shape":"InstanceGroupStatus"},
668
+ "Configurations":{"shape":"ConfigurationList"}
653
669
  }
654
670
  },
655
671
  "InstanceGroupConfig":{
@@ -665,7 +681,8 @@
665
681
  "InstanceRole":{"shape":"InstanceRoleType"},
666
682
  "BidPrice":{"shape":"XmlStringMaxLen256"},
667
683
  "InstanceType":{"shape":"InstanceType"},
668
- "InstanceCount":{"shape":"Integer"}
684
+ "InstanceCount":{"shape":"Integer"},
685
+ "Configurations":{"shape":"ConfigurationList"}
669
686
  }
670
687
  },
671
688
  "InstanceGroupConfigList":{
@@ -1119,11 +1136,14 @@
1119
1136
  "LogUri":{"shape":"XmlString"},
1120
1137
  "AdditionalInfo":{"shape":"XmlString"},
1121
1138
  "AmiVersion":{"shape":"XmlStringMaxLen256"},
1139
+ "ReleaseLabel":{"shape":"XmlStringMaxLen256"},
1122
1140
  "Instances":{"shape":"JobFlowInstancesConfig"},
1123
1141
  "Steps":{"shape":"StepConfigList"},
1124
1142
  "BootstrapActions":{"shape":"BootstrapActionConfigList"},
1125
1143
  "SupportedProducts":{"shape":"SupportedProductsList"},
1126
1144
  "NewSupportedProducts":{"shape":"NewSupportedProductsList"},
1145
+ "Applications":{"shape":"ApplicationList"},
1146
+ "Configurations":{"shape":"ConfigurationList"},
1127
1147
  "VisibleToAllUsers":{"shape":"Boolean"},
1128
1148
  "JobFlowRole":{"shape":"XmlString"},
1129
1149
  "ServiceRole":{"shape":"XmlString"},
@@ -40,6 +40,37 @@
40
40
  }
41
41
  ]
42
42
  },
43
+ "AbortVaultLock":{
44
+ "name":"AbortVaultLock",
45
+ "http":{
46
+ "method":"DELETE",
47
+ "requestUri":"/{accountId}/vaults/{vaultName}/lock-policy",
48
+ "responseCode":204
49
+ },
50
+ "input":{"shape":"AbortVaultLockInput"},
51
+ "errors":[
52
+ {
53
+ "shape":"ResourceNotFoundException",
54
+ "error":{"httpStatusCode":404},
55
+ "exception":true
56
+ },
57
+ {
58
+ "shape":"InvalidParameterValueException",
59
+ "error":{"httpStatusCode":400},
60
+ "exception":true
61
+ },
62
+ {
63
+ "shape":"MissingParameterValueException",
64
+ "error":{"httpStatusCode":400},
65
+ "exception":true
66
+ },
67
+ {
68
+ "shape":"ServiceUnavailableException",
69
+ "error":{"httpStatusCode":500},
70
+ "exception":true
71
+ }
72
+ ]
73
+ },
43
74
  "AddTagsToVault":{
44
75
  "name":"AddTagsToVault",
45
76
  "http":{
@@ -108,6 +139,37 @@
108
139
  }
109
140
  ]
110
141
  },
142
+ "CompleteVaultLock":{
143
+ "name":"CompleteVaultLock",
144
+ "http":{
145
+ "method":"POST",
146
+ "requestUri":"/{accountId}/vaults/{vaultName}/lock-policy/{lockId}",
147
+ "responseCode":204
148
+ },
149
+ "input":{"shape":"CompleteVaultLockInput"},
150
+ "errors":[
151
+ {
152
+ "shape":"ResourceNotFoundException",
153
+ "error":{"httpStatusCode":404},
154
+ "exception":true
155
+ },
156
+ {
157
+ "shape":"InvalidParameterValueException",
158
+ "error":{"httpStatusCode":400},
159
+ "exception":true
160
+ },
161
+ {
162
+ "shape":"MissingParameterValueException",
163
+ "error":{"httpStatusCode":400},
164
+ "exception":true
165
+ },
166
+ {
167
+ "shape":"ServiceUnavailableException",
168
+ "error":{"httpStatusCode":500},
169
+ "exception":true
170
+ }
171
+ ]
172
+ },
111
173
  "CreateVault":{
112
174
  "name":"CreateVault",
113
175
  "http":{
@@ -414,6 +476,37 @@
414
476
  }
415
477
  ]
416
478
  },
479
+ "GetVaultLock":{
480
+ "name":"GetVaultLock",
481
+ "http":{
482
+ "method":"GET",
483
+ "requestUri":"/{accountId}/vaults/{vaultName}/lock-policy"
484
+ },
485
+ "input":{"shape":"GetVaultLockInput"},
486
+ "output":{"shape":"GetVaultLockOutput"},
487
+ "errors":[
488
+ {
489
+ "shape":"ResourceNotFoundException",
490
+ "error":{"httpStatusCode":404},
491
+ "exception":true
492
+ },
493
+ {
494
+ "shape":"InvalidParameterValueException",
495
+ "error":{"httpStatusCode":400},
496
+ "exception":true
497
+ },
498
+ {
499
+ "shape":"MissingParameterValueException",
500
+ "error":{"httpStatusCode":400},
501
+ "exception":true
502
+ },
503
+ {
504
+ "shape":"ServiceUnavailableException",
505
+ "error":{"httpStatusCode":500},
506
+ "exception":true
507
+ }
508
+ ]
509
+ },
417
510
  "GetVaultNotifications":{
418
511
  "name":"GetVaultNotifications",
419
512
  "http":{
@@ -514,6 +607,38 @@
514
607
  }
515
608
  ]
516
609
  },
610
+ "InitiateVaultLock":{
611
+ "name":"InitiateVaultLock",
612
+ "http":{
613
+ "method":"POST",
614
+ "requestUri":"/{accountId}/vaults/{vaultName}/lock-policy",
615
+ "responseCode":201
616
+ },
617
+ "input":{"shape":"InitiateVaultLockInput"},
618
+ "output":{"shape":"InitiateVaultLockOutput"},
619
+ "errors":[
620
+ {
621
+ "shape":"ResourceNotFoundException",
622
+ "error":{"httpStatusCode":404},
623
+ "exception":true
624
+ },
625
+ {
626
+ "shape":"InvalidParameterValueException",
627
+ "error":{"httpStatusCode":400},
628
+ "exception":true
629
+ },
630
+ {
631
+ "shape":"MissingParameterValueException",
632
+ "error":{"httpStatusCode":400},
633
+ "exception":true
634
+ },
635
+ {
636
+ "shape":"ServiceUnavailableException",
637
+ "error":{"httpStatusCode":500},
638
+ "exception":true
639
+ }
640
+ ]
641
+ },
517
642
  "ListJobs":{
518
643
  "name":"ListJobs",
519
644
  "http":{
@@ -889,6 +1014,25 @@
889
1014
  "uploadId"
890
1015
  ]
891
1016
  },
1017
+ "AbortVaultLockInput":{
1018
+ "type":"structure",
1019
+ "members":{
1020
+ "accountId":{
1021
+ "shape":"string",
1022
+ "location":"uri",
1023
+ "locationName":"accountId"
1024
+ },
1025
+ "vaultName":{
1026
+ "shape":"string",
1027
+ "location":"uri",
1028
+ "locationName":"vaultName"
1029
+ }
1030
+ },
1031
+ "required":[
1032
+ "accountId",
1033
+ "vaultName"
1034
+ ]
1035
+ },
892
1036
  "ActionCode":{
893
1037
  "type":"string",
894
1038
  "enum":[
@@ -971,6 +1115,31 @@
971
1115
  "uploadId"
972
1116
  ]
973
1117
  },
1118
+ "CompleteVaultLockInput":{
1119
+ "type":"structure",
1120
+ "members":{
1121
+ "accountId":{
1122
+ "shape":"string",
1123
+ "location":"uri",
1124
+ "locationName":"accountId"
1125
+ },
1126
+ "vaultName":{
1127
+ "shape":"string",
1128
+ "location":"uri",
1129
+ "locationName":"vaultName"
1130
+ },
1131
+ "lockId":{
1132
+ "shape":"string",
1133
+ "location":"uri",
1134
+ "locationName":"lockId"
1135
+ }
1136
+ },
1137
+ "required":[
1138
+ "accountId",
1139
+ "vaultName",
1140
+ "lockId"
1141
+ ]
1142
+ },
974
1143
  "CreateVaultInput":{
975
1144
  "type":"structure",
976
1145
  "members":{
@@ -1264,6 +1433,34 @@
1264
1433
  },
1265
1434
  "payload":"policy"
1266
1435
  },
1436
+ "GetVaultLockInput":{
1437
+ "type":"structure",
1438
+ "members":{
1439
+ "accountId":{
1440
+ "shape":"string",
1441
+ "location":"uri",
1442
+ "locationName":"accountId"
1443
+ },
1444
+ "vaultName":{
1445
+ "shape":"string",
1446
+ "location":"uri",
1447
+ "locationName":"vaultName"
1448
+ }
1449
+ },
1450
+ "required":[
1451
+ "accountId",
1452
+ "vaultName"
1453
+ ]
1454
+ },
1455
+ "GetVaultLockOutput":{
1456
+ "type":"structure",
1457
+ "members":{
1458
+ "Policy":{"shape":"string"},
1459
+ "State":{"shape":"string"},
1460
+ "ExpirationDate":{"shape":"string"},
1461
+ "CreationDate":{"shape":"string"}
1462
+ }
1463
+ },
1267
1464
  "GetVaultNotificationsInput":{
1268
1465
  "type":"structure",
1269
1466
  "members":{
@@ -1392,6 +1589,37 @@
1392
1589
  }
1393
1590
  }
1394
1591
  },
1592
+ "InitiateVaultLockInput":{
1593
+ "type":"structure",
1594
+ "members":{
1595
+ "accountId":{
1596
+ "shape":"string",
1597
+ "location":"uri",
1598
+ "locationName":"accountId"
1599
+ },
1600
+ "vaultName":{
1601
+ "shape":"string",
1602
+ "location":"uri",
1603
+ "locationName":"vaultName"
1604
+ },
1605
+ "policy":{"shape":"VaultLockPolicy"}
1606
+ },
1607
+ "required":[
1608
+ "accountId",
1609
+ "vaultName"
1610
+ ],
1611
+ "payload":"policy"
1612
+ },
1613
+ "InitiateVaultLockOutput":{
1614
+ "type":"structure",
1615
+ "members":{
1616
+ "lockId":{
1617
+ "shape":"string",
1618
+ "location":"header",
1619
+ "locationName":"x-amz-lock-id"
1620
+ }
1621
+ }
1622
+ },
1395
1623
  "InvalidParameterValueException":{
1396
1624
  "type":"structure",
1397
1625
  "members":{
@@ -1895,6 +2123,12 @@
1895
2123
  "type":"list",
1896
2124
  "member":{"shape":"DescribeVaultOutput"}
1897
2125
  },
2126
+ "VaultLockPolicy":{
2127
+ "type":"structure",
2128
+ "members":{
2129
+ "Policy":{"shape":"string"}
2130
+ }
2131
+ },
1898
2132
  "VaultNotificationConfig":{
1899
2133
  "type":"structure",
1900
2134
  "members":{
@@ -102,6 +102,13 @@
102
102
  "limit_key": "MaxItems",
103
103
  "result_key": "Policies"
104
104
  },
105
+ "ListPolicyVersions": {
106
+ "input_token": "Marker",
107
+ "output_token": "Marker",
108
+ "more_results": "IsTruncated",
109
+ "limit_key": "MaxItems",
110
+ "result_key": "Versions"
111
+ },
105
112
  "ListRolePolicies": {
106
113
  "input_token": "Marker",
107
114
  "output_token": "Marker",
@@ -729,6 +729,14 @@
729
729
  }
730
730
  }
731
731
  },
732
+ "waiters": {
733
+ "Exists": {
734
+ "waiterName": "InstanceProfileExists",
735
+ "params": [
736
+ { "target": "InstanceProfileName", "source": "identifier", "name": "Name" }
737
+ ]
738
+ }
739
+ },
732
740
  "has": {
733
741
  "Roles": {
734
742
  "resource": {
@@ -1,6 +1,23 @@
1
1
  {
2
2
  "version": 2,
3
3
  "waiters": {
4
+ "InstanceProfileExists": {
5
+ "delay": 1,
6
+ "operation": "GetInstanceProfile",
7
+ "maxAttempts": 40,
8
+ "acceptors": [
9
+ {
10
+ "expected": 200,
11
+ "matcher": "status",
12
+ "state": "success"
13
+ },
14
+ {
15
+ "state": "retry",
16
+ "matcher": "status",
17
+ "expected": 404
18
+ }
19
+ ]
20
+ },
4
21
  "UserExists": {
5
22
  "delay": 1,
6
23
  "operation": "GetUser",
@@ -1,6 +1,23 @@
1
1
  {
2
2
  "version": 2,
3
3
  "waiters": {
4
+ "AppExists": {
5
+ "delay": 1,
6
+ "operation": "DescribeApps",
7
+ "maxAttempts": 40,
8
+ "acceptors": [
9
+ {
10
+ "expected": 200,
11
+ "matcher": "status",
12
+ "state": "success"
13
+ },
14
+ {
15
+ "matcher": "status",
16
+ "expected": 400,
17
+ "state": "failure"
18
+ }
19
+ ]
20
+ },
4
21
  "InstanceOnline": {
5
22
  "delay": 15,
6
23
  "operation": "DescribeInstances",
@@ -7,6 +7,7 @@ Seahorse::Util.irregular_inflections({
7
7
  'Ec2' => 'ec2',
8
8
  'ElastiCache' => 'elasticache',
9
9
  'iSCSI' => 'iscsi',
10
+ #'SSEKMS' => 'sse_kms',
10
11
  })
11
12
 
12
13
  module Aws
@@ -120,6 +121,7 @@ module Aws
120
121
  autoload :ParamFormatter, 'aws-sdk-core/api/docs/param_formatter'
121
122
  autoload :RequestSyntaxExample, 'aws-sdk-core/api/docs/request_syntax_example'
122
123
  autoload :ResponseStructureExample, 'aws-sdk-core/api/docs/response_structure_example'
124
+ autoload :SharedExample, 'aws-sdk-core/api/docs/shared_example'
123
125
  autoload :Utils, 'aws-sdk-core/api/docs/utils'
124
126
  end
125
127
  end
@@ -205,8 +207,9 @@ module Aws
205
207
  # @api private
206
208
  module Stubbing
207
209
  autoload :EmptyStub, 'aws-sdk-core/stubbing/empty_stub'
208
- autoload :StubData, 'aws-sdk-core/stubbing/stub_data'
209
210
  autoload :DataApplicator, 'aws-sdk-core/stubbing/data_applicator'
211
+ autoload :StubData, 'aws-sdk-core/stubbing/stub_data'
212
+ autoload :XmlError, 'aws-sdk-core/stubbing/xml_error'
210
213
  module Protocols
211
214
  autoload :EC2, 'aws-sdk-core/stubbing/protocols/ec2'
212
215
  autoload :Json, 'aws-sdk-core/stubbing/protocols/json'
@@ -25,15 +25,6 @@ module Aws
25
25
  end
26
26
 
27
27
  def apply_plugins(client_class)
28
- protocol = client_class.api.metadata['protocol']
29
- plugin = case protocol
30
- when 'ec2' then Aws::Plugins::Protocols::EC2
31
- when 'query' then Aws::Plugins::Protocols::Query
32
- when 'json' then Aws::Plugins::Protocols::JsonRpc
33
- when 'rest-json' then Aws::Plugins::Protocols::RestJson
34
- when 'rest-xml' then Aws::Plugins::Protocols::RestXml
35
- end
36
- client_class.add_plugin(plugin) if plugin
37
28
  prefix = client_class.api.metadata['endpointPrefix']
38
29
  if @plugins[prefix]
39
30
  @plugins[prefix][:add].each { |p| client_class.add_plugin(p) }
@@ -64,12 +64,40 @@ module Aws
64
64
  end
65
65
 
66
66
  def example_tags(method_name, operation)
67
- examples_from_disk(method_name, operation) + [
67
+ shared_examples(method_name, operation) +
68
+ examples_from_disk(method_name, operation) +
69
+ [
68
70
  request_syntax_example(method_name, operation),
69
71
  response_structure_example(method_name, operation),
70
72
  ].compact
71
73
  end
72
74
 
75
+ def shared_examples(method_name, operation)
76
+ if operation['examples']
77
+ operation['examples'].map do |example|
78
+ shared_example(example, method_name, operation)
79
+ end
80
+ else
81
+ []
82
+ end
83
+ end
84
+
85
+ def shared_example(json_ex, method_name, operation)
86
+ input_comments = json_ex['comments']['input']
87
+ input = SharedExample.new(json_ex['input'], method_name, operation, input_comments).to_str_input
88
+ parts = []
89
+ parts << "@example Example: #{json_ex['title']}\n\n"
90
+ parts << " # #{json_ex['description']}\n\n"
91
+ parts += input.lines.map { |line| " " + line }
92
+ if json_ex['output']
93
+ output_comments = json_ex['comments']['output']
94
+ output = SharedExample.new(json_ex['output'], method_name, operation, output_comments).to_str_output
95
+ parts << "\n\n # resp.to_h outputs the following:\n"
96
+ parts += output.lines.map { |line| " " + line }
97
+ end
98
+ tag(parts.join)
99
+ end
100
+
73
101
  def examples_from_disk(method_name, operation)
74
102
  dir = "examples/#{@service_name.downcase}/client/#{method_name}/*.rb"
75
103
  Dir.glob(dir).map do |path|
@@ -0,0 +1,99 @@
1
+ module Aws
2
+ module Api
3
+ module Docs
4
+ class SharedExample
5
+
6
+ include Utils
7
+ include Seahorse::Model::Shapes
8
+
9
+ def initialize(params, method_name, operation, comments)
10
+ @params = params
11
+ @method_name = method_name
12
+ @operation = operation
13
+ @comments = comments
14
+ end
15
+
16
+ def to_str_input
17
+ lines = structure(@params, @operation.input, "", [])
18
+ params = lines.join("\n")
19
+ "resp = client.#{@method_name}(#{params})"
20
+ end
21
+
22
+ def to_str_output
23
+ lines = structure(@params, @operation.output, "", [])
24
+ params = lines.join("\n")
25
+ "#{params}"
26
+ end
27
+
28
+ private
29
+
30
+ def entry(json, ref, indent, path)
31
+ case ref.shape
32
+ when StructureShape then structure(json, ref, indent, path)
33
+ when MapShape then map(json, ref, indent, path)
34
+ when ListShape then list(json, ref, indent, path)
35
+ when TimestampShape then "Time.parse(#{json.inspect})"
36
+ when StringShape, BlobShape then json.inspect
37
+ else json
38
+ end
39
+ end
40
+
41
+ def structure(json, ref, indent, path)
42
+ lines = ["{"]
43
+ json.each do |key, val|
44
+ path << ".#{key}"
45
+ sc_key = Seahorse::Util.underscore(key)
46
+ shape_val = entry(val, ref.shape.member(sc_key), "#{indent} ", path)
47
+ if shape_val.is_a?(Array)
48
+ shape_val = shape_val.join("\n")
49
+ end
50
+ lines << "#{indent} #{sc_key}: #{shape_val}, #{apply_comments(path)}"
51
+ path.pop
52
+ end
53
+ lines << "#{indent}}"
54
+ lines
55
+ end
56
+
57
+ def map(json, ref, indent, path)
58
+ lines = ["{"]
59
+ json.each do |key, val|
60
+ path << ".#{key}"
61
+ shape_val = entry(val, ref.shape.value, "#{indent} ", path)
62
+ if shape_val.is_a?(Array)
63
+ shape_val = shape_val.join("\n")
64
+ end
65
+ lines << "#{indent} \"#{key}\" => #{shape_val}, #{apply_comments(path)}"
66
+ path.pop
67
+ end
68
+ lines << "#{indent}}"
69
+ lines
70
+ end
71
+
72
+ def list(json, ref, indent, path)
73
+ lines = ["["]
74
+ json.each_with_index do |member, index|
75
+ path << "[#{index}]"
76
+ shape_val = entry(member, ref.shape.member, "#{indent} ", path)
77
+ if shape_val.is_a?(Array)
78
+ shape_val = shape_val.join("\n")
79
+ end
80
+ lines << "#{indent} #{shape_val}, #{apply_comments(path)}"
81
+ path.pop
82
+ end
83
+ lines << "#{indent}]"
84
+ lines
85
+ end
86
+
87
+ def apply_comments(path)
88
+ key = path.join().sub(/^\./, '')
89
+ if @comments && @comments[key]
90
+ "# #{@comments[key]}"
91
+ else
92
+ ""
93
+ end
94
+ end
95
+
96
+ end
97
+ end
98
+ end
99
+ end
@@ -17,6 +17,15 @@ module Aws
17
17
  'Aws::Plugins::StubResponses',
18
18
  ]
19
19
 
20
+ # @api private
21
+ PROTOCOL_PLUGINS = Hash.new(DEFAULT_PLUGINS).merge({
22
+ 'json' => DEFAULT_PLUGINS + %w(Aws::Plugins::Protocols::JsonRpc),
23
+ 'rest-json' => DEFAULT_PLUGINS + %w(Aws::Plugins::Protocols::RestJson),
24
+ 'rest-xml' => DEFAULT_PLUGINS + %w(Aws::Plugins::Protocols::RestXml),
25
+ 'query' => DEFAULT_PLUGINS + %w(Aws::Plugins::Protocols::Query),
26
+ 'ec2' => DEFAULT_PLUGINS + %w(Aws::Plugins::Protocols::EC2),
27
+ })
28
+
20
29
  include ClientStubs
21
30
  include ClientWaiters
22
31
 
@@ -32,10 +41,14 @@ module Aws
32
41
  client_class.identifier = svc_name.downcase.to_sym
33
42
  client_class.set_api(Api::Builder.build(options[:api], options))
34
43
  client_class.set_waiters(options[:waiters])
35
- DEFAULT_PLUGINS.each do |plugin|
44
+
45
+ protocol = client_class.api.metadata['protocol']
46
+ PROTOCOL_PLUGINS[protocol].each do |plugin|
36
47
  client_class.add_plugin(plugin)
37
48
  end
49
+
38
50
  Api::Customizations.apply_plugins(client_class)
51
+
39
52
  client_class
40
53
  end
41
54
 
@@ -33,6 +33,7 @@ module Aws
33
33
  list[:l] << format(value)
34
34
  end
35
35
  when String then { s: obj }
36
+ when Symbol then { s: obj.to_s }
36
37
  when Numeric then { n: obj.to_s }
37
38
  when StringIO, IO then { b: obj }
38
39
  when Set then format_set(obj)
@@ -49,7 +50,7 @@ module Aws
49
50
 
50
51
  def format_set(set)
51
52
  case set.first
52
- when String then { ss: set.map(&:to_s) }
53
+ when String, Symbol then { ss: set.map(&:to_s) }
53
54
  when Numeric then { ns: set.map(&:to_s) }
54
55
  when StringIO, IO then { bs: set.to_a }
55
56
  else
@@ -73,6 +73,15 @@ module Aws
73
73
  AssumeRoleWithWebIdentity
74
74
  ))
75
75
 
76
+ COGNITO_IDENTITY_UNSIGNED_REQUESTS = Set.new(%w(
77
+ GetCredentialsForIdentity
78
+ GetId
79
+ GetOpenIdToken
80
+ ListIdentityPools
81
+ UnlinkDeveloperIdentity
82
+ UnlinkIdentity
83
+ ))
84
+
76
85
  def call(context)
77
86
  sign_authenticated_requests(context) unless unsigned_request?(context)
78
87
  @handler.call(context)
@@ -105,6 +114,8 @@ module Aws
105
114
  STS_UNSIGNED_REQUESTS.include?(context.operation.name)
106
115
  elsif context.config.api.metadata['endpointPrefix'] == 'cloudsearchdomain'
107
116
  context.config.credentials.nil? || !context.config.credentials.set?
117
+ elsif context.config.api.metadata['endpointPrefix'] == 'cognito-identity'
118
+ COGNITO_IDENTITY_UNSIGNED_REQUESTS.include?(context.operation.name)
108
119
  else
109
120
  false
110
121
  end
@@ -11,6 +11,10 @@ module Aws
11
11
  end
12
12
 
13
13
  def stub_error(error_code)
14
+ http_resp = Seahorse::Client::Http::Response.new
15
+ http_resp.status_code = 400
16
+ http_resp.body = XmlError.new(error_code).to_xml
17
+ http_resp
14
18
  end
15
19
 
16
20
  private
@@ -16,14 +16,7 @@ module Aws
16
16
  def stub_error(error_code)
17
17
  http_resp = Seahorse::Client::Http::Response.new
18
18
  http_resp.status_code = 400
19
- http_resp.body = <<-XML.strip
20
- <ErrorResponse>
21
- <Error>
22
- <Code>#{error_code}</Code>
23
- <Message>stubbed-response-error-message</Message>
24
- </Error>
25
- </ErrorResponse>
26
- XML
19
+ http_resp.body = XmlError.new(error_code).to_xml
27
20
  http_resp
28
21
  end
29
22
 
@@ -0,0 +1,22 @@
1
+ module Aws
2
+ module Stubbing
3
+ class XmlError
4
+
5
+ def initialize(error_code)
6
+ @error_code = error_code
7
+ end
8
+
9
+ def to_xml
10
+ <<-XML.strip
11
+ <ErrorResponse>
12
+ <Error>
13
+ <Code>#{@error_code}</Code>
14
+ <Message>stubbed-response-error-message</Message>
15
+ </Error>
16
+ </ErrorResponse>
17
+ XML
18
+ end
19
+
20
+ end
21
+ end
22
+ end
@@ -1,3 +1,3 @@
1
1
  module Aws
2
- VERSION = '2.1.7'
2
+ VERSION = '2.1.8'
3
3
  end
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.1.7
4
+ version: 2.1.8
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: 2015-07-14 00:00:00.000000000 Z
11
+ date: 2015-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -168,6 +168,7 @@ files:
168
168
  - lib/aws-sdk-core/api/docs/param_formatter.rb
169
169
  - lib/aws-sdk-core/api/docs/request_syntax_example.rb
170
170
  - lib/aws-sdk-core/api/docs/response_structure_example.rb
171
+ - lib/aws-sdk-core/api/docs/shared_example.rb
171
172
  - lib/aws-sdk-core/api/docs/utils.rb
172
173
  - lib/aws-sdk-core/api/shape_map.rb
173
174
  - lib/aws-sdk-core/assume_role_credentials.rb
@@ -315,6 +316,7 @@ files:
315
316
  - lib/aws-sdk-core/stubbing/protocols/rest_json.rb
316
317
  - lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
317
318
  - lib/aws-sdk-core/stubbing/stub_data.rb
319
+ - lib/aws-sdk-core/stubbing/xml_error.rb
318
320
  - lib/aws-sdk-core/support.rb
319
321
  - lib/aws-sdk-core/swf.rb
320
322
  - lib/aws-sdk-core/tree_hash.rb