Permalink
Browse files

Add support for Amazon Kinesis (AWS.Kinesis)

  • Loading branch information...
1 parent c896b99 commit 4195c88a8a29d6a87c7f957cad7329784a1a2149 Loren Segal committed Dec 12, 2013
View
@@ -53,6 +53,7 @@ The SDK currently supports the following services:
<tr><td>Amazon Elastic Transcoder</td><td>AWS.ElasticTranscoder</td><td>2012-09-25</td></tr>
<tr><td>Amazon ElastiCache</td><td>AWS.ElastiCache</td><td>2013-06-15</td></tr>
<tr><td>Amazon Glacier</td><td>AWS.Glacier</td><td>2012-06-01</td></tr>
+ <tr><td>Amazon Kinesis</td><td>AWS.Kinesis</td><td>2013-12-02</td></tr>
<tr><td>Amazon Redshift</td><td>AWS.Redshift</td><td>2012-12-01</td></tr>
<tr><td rowspan="3">Amazon Relational Database Service</td><td rowspan="3">AWS.RDS</td><td>2013-01-10</td></tr>
<tr><td>2013-02-12</td></tr>
@@ -0,0 +1,22 @@
+# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"). You
+# may not use this file except in compliance with the License. A copy of
+# the License is located at
+#
+# http://aws.amazon.com/apache2.0/
+#
+# or in the "license" file accompanying this file. This file is
+# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+# ANY KIND, either express or implied. See the License for the specific
+# language governing permissions and limitations under the License.
+
+# language: en
+@kinesis
+Feature: Amazon Kinesis
+
+ I want to use Amazon Kinesis
+
+ Scenario: Error handling
+ Given I try to describe a stream in Kinesis
+ Then the error code should be "ResourceNotFoundException"
@@ -0,0 +1,25 @@
+/**
+ * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You
+ * may not use this file except in compliance with the License. A copy of
+ * the License is located at
+ *
+ * http://aws.amazon.com/apache2.0/
+ *
+ * or in the "license" file accompanying this file. This file is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ * ANY KIND, either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
+ */
+
+module.exports = function() {
+ this.Before("@kinesis", function (callback) {
+ this.service = new this.AWS.Kinesis();
+ callback();
+ });
+
+ this.Given(/^I try to describe a stream in Kinesis$/, function(callback) {
+ this.request(null, 'describeStream', {StreamName: 'XXINVALIDXX'}, callback, false);
+ });
+};
View
@@ -33,6 +33,7 @@ require('./services/emr');
require('./services/glacier');
require('./services/iam');
require('./services/importexport');
+require('./services/kinesis');
require('./services/opsworks');
require('./services/rds');
require('./services/redshift');
@@ -0,0 +1,294 @@
+/**
+ * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You
+ * may not use this file except in compliance with the License. A copy of
+ * the License is located at
+ *
+ * http://aws.amazon.com/apache2.0/
+ *
+ * or in the "license" file accompanying this file. This file is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ * ANY KIND, either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
+ */
+
+module.exports = {
+ format: 'json',
+ apiVersion: '2013-12-02',
+ endpointPrefix: 'kinesis',
+ jsonVersion: '1.1',
+ serviceAbbreviation: 'Kinesis',
+ serviceFullName: 'Amazon Kinesis',
+ signatureVersion: 'v4',
+ targetPrefix: 'Kinesis_20131202',
+ timestampFormat: 'iso8601',
+ operations: {
+ createStream: {
+ name: 'CreateStream',
+ input: {
+ type: 'structure',
+ members: {
+ StreamName: {
+ required: true
+ },
+ ShardCount: {
+ type: 'integer',
+ required: true
+ }
+ }
+ },
+ output: {
+ type: 'structure',
+ members: {
+ }
+ }
+ },
+ deleteStream: {
+ name: 'DeleteStream',
+ input: {
+ type: 'structure',
+ members: {
+ StreamName: {
+ required: true
+ }
+ }
+ },
+ output: {
+ type: 'structure',
+ members: {
+ }
+ }
+ },
+ describeStream: {
+ name: 'DescribeStream',
+ input: {
+ type: 'structure',
+ members: {
+ StreamName: {
+ required: true
+ },
+ Limit: {
+ type: 'integer'
+ },
+ ExclusiveStartShardId: {
+ }
+ }
+ },
+ output: {
+ type: 'structure',
+ members: {
+ StreamDescription: {
+ type: 'structure',
+ members: {
+ StreamName: {
+ },
+ StreamARN: {
+ },
+ StreamStatus: {
+ },
+ Shards: {
+ type: 'list',
+ members: {
+ type: 'structure',
+ members: {
+ ShardId: {
+ },
+ ParentShardId: {
+ },
+ AdjacentParentShardId: {
+ },
+ HashKeyRange: {
+ type: 'structure',
+ members: {
+ StartingHashKey: {
+ },
+ EndingHashKey: {
+ }
+ }
+ },
+ SequenceNumberRange: {
+ type: 'structure',
+ members: {
+ StartingSequenceNumber: {
+ },
+ EndingSequenceNumber: {
+ }
+ }
+ }
+ }
+ }
+ },
+ HasMoreShards: {
+ type: 'boolean'
+ }
+ }
+ }
+ }
+ }
+ },
+ getRecords: {
+ name: 'GetRecords',
+ input: {
+ type: 'structure',
+ members: {
+ ShardIterator: {
+ required: true
+ },
+ Limit: {
+ type: 'integer'
+ }
+ }
+ },
+ output: {
+ type: 'structure',
+ members: {
+ Records: {
+ type: 'list',
+ members: {
+ type: 'structure',
+ members: {
+ SequenceNumber: {
+ },
+ Data: {
+ type: 'base64'
+ },
+ PartitionKey: {
+ }
+ }
+ }
+ },
+ NextShardIterator: {
+ }
+ }
+ }
+ },
+ getShardIterator: {
+ name: 'GetShardIterator',
+ input: {
+ type: 'structure',
+ members: {
+ StreamName: {
+ required: true
+ },
+ ShardId: {
+ required: true
+ },
+ ShardIteratorType: {
+ required: true
+ },
+ StartingSequenceNumber: {
+ }
+ }
+ },
+ output: {
+ type: 'structure',
+ members: {
+ ShardIterator: {
+ }
+ }
+ }
+ },
+ listStreams: {
+ name: 'ListStreams',
+ input: {
+ type: 'structure',
+ members: {
+ Limit: {
+ type: 'integer'
+ },
+ ExclusiveStartStreamName: {
+ }
+ }
+ },
+ output: {
+ type: 'structure',
+ members: {
+ StreamNames: {
+ type: 'list',
+ members: {
+ }
+ },
+ HasMoreStreams: {
+ type: 'boolean'
+ }
+ }
+ }
+ },
+ mergeShards: {
+ name: 'MergeShards',
+ input: {
+ type: 'structure',
+ members: {
+ StreamName: {
+ required: true
+ },
+ ShardToMerge: {
+ required: true
+ },
+ AdjacentShardToMerge: {
+ required: true
+ }
+ }
+ },
+ output: {
+ type: 'structure',
+ members: {
+ }
+ }
+ },
+ putRecord: {
+ name: 'PutRecord',
+ input: {
+ type: 'structure',
+ members: {
+ StreamName: {
+ required: true
+ },
+ Data: {
+ type: 'base64',
+ required: true
+ },
+ PartitionKey: {
+ required: true
+ },
+ ExplicitHashKey: {
+ },
+ SequenceNumberForOrdering: {
+ }
+ }
+ },
+ output: {
+ type: 'structure',
+ members: {
+ ShardId: {
+ },
+ SequenceNumber: {
+ }
+ }
+ }
+ },
+ splitShard: {
+ name: 'SplitShard',
+ input: {
+ type: 'structure',
+ members: {
+ StreamName: {
+ required: true
+ },
+ ShardToSplit: {
+ required: true
+ },
+ NewStartingHashKey: {
+ required: true
+ }
+ }
+ },
+ output: {
+ type: 'structure',
+ members: {
+ }
+ }
+ }
+ }
+};
View
@@ -0,0 +1,20 @@
+/**
+ * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You
+ * may not use this file except in compliance with the License. A copy of
+ * the License is located at
+ *
+ * http://aws.amazon.com/apache2.0/
+ *
+ * or in the "license" file accompanying this file. This file is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ * ANY KIND, either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
+ */
+
+var AWS = require('../core');
+
+AWS.Kinesis = AWS.Service.defineService('kinesis', ['2013-12-02']);
+
+module.exports = AWS.Kinesis;

0 comments on commit 4195c88

Please sign in to comment.