aws-sdk 2.0.1 → 2.0.5
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.
- package/.eslintrc +20 -0
- package/.gitignore +10 -0
- package/.travis.yml +20 -0
- package/.yardopts +20 -0
- package/.yardopts_guide +21 -0
- package/Gemfile +16 -0
- package/Gemfile.lock +34 -0
- package/README.md +5 -6
- package/Rakefile +14 -0
- package/UPGRADING.md +9 -4
- package/configuration.sample +5 -0
- package/dist/BUNDLE_LICENSE.txt +96 -0
- package/dist/aws-sdk.js +9594 -0
- package/dist/aws-sdk.min.js +21 -0
- package/dist-tools/.eslintrc +10 -0
- package/dist-tools/browser-builder.js +142 -0
- package/dist-tools/strategies/cache.js +68 -0
- package/dist-tools/strategies/default.js +165 -0
- package/dist-tools/test/browser-builder.mocha.spec.coffee +182 -0
- package/dist-tools/test/helpers.coffee +16 -0
- package/doc-src/guide/browser-building.md +93 -0
- package/doc-src/guide/browser-configuring-wif.md +287 -0
- package/doc-src/guide/browser-configuring.md +218 -0
- package/doc-src/guide/browser-examples.md +220 -0
- package/doc-src/guide/browser-intro.md +46 -0
- package/doc-src/guide/browser-making-requests.md +279 -0
- package/doc-src/guide/browser-services.md +75 -0
- package/doc-src/guide/index.md +41 -0
- package/doc-src/guide/node-configuring.md +272 -0
- package/doc-src/guide/node-examples.md +341 -0
- package/doc-src/guide/node-intro.md +32 -0
- package/doc-src/guide/node-making-requests.md +309 -0
- package/doc-src/guide/node-services.md +159 -0
- package/doc-src/templates/api-versions/model_documentor.rb +366 -0
- package/doc-src/templates/api-versions/plugin.rb +230 -0
- package/doc-src/templates/api-versions/templates/default/class/html/setup.rb +9 -0
- package/doc-src/templates/api-versions/templates/default/class/html/waiter_details_list.erb +7 -0
- package/doc-src/templates/api-versions/templates/default/class/html/waiter_summary.erb +7 -0
- package/doc-src/templates/api-versions/templates/default/docstring/html/experimental.erb +4 -0
- package/doc-src/templates/api-versions/templates/default/docstring/setup.rb +9 -0
- package/doc-src/templates/api-versions/templates/default/fulldoc/html/css/common.css +6 -0
- package/doc-src/templates/api-versions/templates/default/fulldoc/html/setup.rb +62 -0
- package/doc-src/templates/api-versions/templates/default/layout/html/services.erb +10 -0
- package/doc-src/templates/api-versions/templates/default/layout/html/setup.rb +28 -0
- package/doc-src/templates/api-versions/templates/default/module/html/box_info.erb +45 -0
- package/doc-src/templates/api-versions/templates/default/module/html/children.erb +8 -0
- package/doc-src/templates/api-versions/templates/default/tags/setup.rb +3 -0
- package/doc-src/templates/api-versions/templates/default/waiter_details/html/method_signature.erb +3 -0
- package/doc-src/templates/api-versions/templates/default/waiter_details/html/setup.rb +5 -0
- package/doc-src/templates/default/layout/html/footer.erb +31 -0
- package/doc-src/templates/default/layout/html/layout.erb +23 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/css/highlight.github.css +127 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/css/style.css +1192 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/img/logo.png +0 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/app.js +33 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/highlight.pack.js +27 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/AUTHORS +55 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/LICENSE +25 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/doctools.js +247 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/file.png +0 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/searchtools.js +568 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/underscore.js +23 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/search.erb +29 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/search_index.erb +1 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/setup.rb +75 -0
- package/doc-src/templates/flasky_sphinx_guide/layout/html/layout.erb +93 -0
- package/doc-src/templates/flasky_sphinx_guide/layout/html/setup.rb +9 -0
- package/doc-src/templates/flasky_sphinx_guide/layout/html/sidebar.erb +45 -0
- package/doc-src/templates/flasky_sphinx_guide/onefile/html/layout.erb +51 -0
- package/doc-src/templates/flasky_sphinx_guide/onefile/html/setup.rb +1 -0
- package/eslint-rules/no-require-in-service.js +10 -0
- package/features/autoscaling/autoscaling.feature +21 -0
- package/features/autoscaling/step_definitions/autoscaling.js +49 -0
- package/features/cloudformation/cloudformation.feature +22 -0
- package/features/cloudformation/step_definitions/cloudformation.js +26 -0
- package/features/cloudfront/cloudfront.feature +28 -0
- package/features/cloudfront/step_definitions/cloudfront-latest.js +54 -0
- package/features/cloudfront/step_definitions/cloudfront.js +21 -0
- package/features/cloudsearch/cloudsearch.feature +34 -0
- package/features/cloudsearch/step_definitions/cloudsearch.js +42 -0
- package/features/cloudtrail/cloudtrail.feature +17 -0
- package/features/cloudtrail/step_definitions/cloudtrail.js +14 -0
- package/features/cloudwatch/cloudwatch.feature +15 -0
- package/features/cloudwatch/step_definitions/cloudwatch.js +48 -0
- package/features/datapipeline/datapipeline.feature +23 -0
- package/features/datapipeline/step_definitions/datapipeline.js +79 -0
- package/features/directconnect/directconnect.feature +20 -0
- package/features/directconnect/step_definitions/directconnect.js +44 -0
- package/features/dynamodb/crc32.feature +18 -0
- package/features/dynamodb/step_definitions/dynamodb.js +154 -0
- package/features/dynamodb/tables.feature +50 -0
- package/features/ec2/ec2.feature +28 -0
- package/features/ec2/step_definitions/ec2.js +65 -0
- package/features/elasticache/elasticache.feature +20 -0
- package/features/elasticache/step_definitions/elasticache.js +34 -0
- package/features/elasticbeanstalk/elasticbeanstalk.feature +22 -0
- package/features/elasticbeanstalk/step_definitions/elasticbeanstalk.js +38 -0
- package/features/elastictranscoder/elastictranscoder.feature +24 -0
- package/features/elastictranscoder/step_definitions/elastictranscoder.js +56 -0
- package/features/elb/elb.feature +19 -0
- package/features/elb/step_definitions/elb.js +37 -0
- package/features/emr/emr.feature +16 -0
- package/features/emr/step_definitions/emr.js +45 -0
- package/features/extra/assertions.js +29 -0
- package/features/extra/dummy.feature +0 -0
- package/features/extra/fixtures/testfile.txt +1 -0
- package/features/extra/helpers.js +113 -0
- package/features/extra/hooks.js +107 -0
- package/features/extra/world.js +12 -0
- package/features/glacier/glacier.feature +47 -0
- package/features/glacier/step_definitions/glacier.js +112 -0
- package/features/iam/iam.feature +24 -0
- package/features/iam/step_definitions/iam.js +66 -0
- package/features/importexport/importexport.feature +53 -0
- package/features/importexport/step_definitions/importexport.js +42 -0
- package/features/kinesis/kinesis.feature +9 -0
- package/features/kinesis/step_definitions/kinesis.js +10 -0
- package/features/opsworks/opsworks.feature +26 -0
- package/features/opsworks/step_definitions/opsworks.js +42 -0
- package/features/rds/rds.feature +32 -0
- package/features/rds/step_definitions/rds.js +72 -0
- package/features/redshift/redshift.feature +20 -0
- package/features/redshift/step_definitions/redshift.js +33 -0
- package/features/route53/route53.feature +41 -0
- package/features/route53/step_definitions/route53.js +97 -0
- package/features/s3/buckets.feature +40 -0
- package/features/s3/objects.feature +122 -0
- package/features/s3/step_definitions/buckets.js +136 -0
- package/features/s3/step_definitions/hooks.js +39 -0
- package/features/s3/step_definitions/objects.js +204 -0
- package/features/s3/step_definitions/proxy.js +44 -0
- package/features/ses/ses.feature +20 -0
- package/features/ses/step_definitions/ses.js +22 -0
- package/features/simpledb/simpledb.feature +29 -0
- package/features/simpledb/step_definitions/simpledb.js +46 -0
- package/features/sns/sns.feature +15 -0
- package/features/sns/step_definitions/sns.js +33 -0
- package/features/sqs/messages.feature +21 -0
- package/features/sqs/queues.feature +18 -0
- package/features/sqs/step_definitions/messages.js +46 -0
- package/features/sqs/step_definitions/queues.js +33 -0
- package/features/sqs/step_definitions/sqs.js +7 -0
- package/features/storagegateway/step_definitions/storagegateway.js +16 -0
- package/features/storagegateway/storagegateway.feature +13 -0
- package/features/sts/step_definitions/sts.js +35 -0
- package/features/sts/sts.feature +29 -0
- package/features/support/step_definitions/support.js +35 -0
- package/features/support/support.feature +18 -0
- package/features/swf/step_definitions/swf.js +38 -0
- package/features/swf/swf.feature +15 -0
- package/index.js +2 -0
- package/lib/core.js +2 -2
- package/lib/credentials/shared_ini_file_credentials.js +0 -1
- package/lib/event_listeners.js +13 -1
- package/lib/http/node.js +19 -30
- package/lib/model/resource_waiter.js +0 -4
- package/lib/model/shape.js +2 -1
- package/lib/protocol/rest_xml.js +1 -1
- package/lib/region_config.js +31 -0
- package/lib/region_config.json +56 -0
- package/lib/request.js +37 -45
- package/lib/sequential_executor.js +17 -34
- package/lib/service.js +17 -44
- package/lib/services/cloudsearchdomain.js +69 -0
- package/lib/services/route53.js +0 -12
- package/lib/services/s3.js +3 -19
- package/lib/signers/v4.js +2 -1
- package/lib/util.js +28 -3
- package/package.json +3 -3
- package/scripts/console +11 -3
- package/scripts/coverage +126 -0
- package/tasks/apis.rake +122 -0
- package/tasks/browser.rake +89 -0
- package/tasks/docs.rake +36 -0
- package/tasks/lib/cucumber_generator.rb +40 -0
- package/tasks/util.rake +33 -0
- package/test/browser/js/jasmine-1.3.1.js +2600 -0
- package/test/browser/js/jasmine-html.js +681 -0
- package/test/browser/runner.html +109 -0
- package/test/browser/runner.js +92 -0
- package/test/browser/sample/appinfo.sample.js +15 -0
- package/test/browser/sample/console.html +429 -0
- package/test/browser/sample/css/smoothness/images/animated-overlay.gif +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- package/test/browser/sample/css/smoothness/jquery-ui-1.10.1.custom.css +1175 -0
- package/test/browser/sample/css/smoothness/jquery-ui-1.10.1.custom.min.css +5 -0
- package/test/browser/sample/img/loading.gif +0 -0
- package/test/browser/sample/js/jquery-1.9.1.js +9597 -0
- package/test/browser/sample/js/jquery-ui-1.10.1.custom.js +14903 -0
- package/test/browser/sample/js/jquery-ui-1.10.1.custom.min.js +6 -0
- package/test/browser/sample/s3upload.html +111 -0
- package/test/browser.spec.coffee +207 -0
- package/test/config.spec.coffee +202 -0
- package/test/credential_provider_chain.spec.coffee +90 -0
- package/test/credentials.spec.coffee +452 -0
- package/test/endpoint.spec.coffee +80 -0
- package/test/event_listeners.spec.coffee +493 -0
- package/test/helpers.coffee +150 -0
- package/test/http_request.spec.coffee +55 -0
- package/test/json/builder.spec.coffee +129 -0
- package/test/json/parser.spec.coffee +108 -0
- package/test/metadata_service.spec.coffee +54 -0
- package/test/model/api.spec.coffee +67 -0
- package/test/model/shape.spec.coffee +23 -0
- package/test/node_http_client.spec.coffee +40 -0
- package/test/param_validator.spec.coffee +456 -0
- package/test/protocol/json.spec.coffee +167 -0
- package/test/protocol/query.spec.coffee +191 -0
- package/test/protocol/rest.spec.coffee +237 -0
- package/test/protocol/rest_json.spec.coffee +255 -0
- package/test/protocol/rest_xml.spec.coffee +329 -0
- package/test/query/query_param_serializer.spec.coffee +327 -0
- package/test/region_config.spec.coffee +50 -0
- package/test/request.spec.coffee +316 -0
- package/test/resource_waiter.spec.coffee +89 -0
- package/test/response.spec.coffee +81 -0
- package/test/sequential_executor.spec.coffee +118 -0
- package/test/service.spec.coffee +230 -0
- package/test/services/cloudfront.spec.coffee +44 -0
- package/test/services/cloudsearchdomain.spec.coffee +23 -0
- package/test/services/dynamodb.spec.coffee +32 -0
- package/test/services/ec2.spec.coffee +78 -0
- package/test/services/elastictranscoder.spec.coffee +43 -0
- package/test/services/glacier.spec.coffee +61 -0
- package/test/services/rds.spec.coffee +38 -0
- package/test/services/route53.spec.coffee +77 -0
- package/test/services/s3.spec.coffee +538 -0
- package/test/services/simpledb.spec.coffee +12 -0
- package/test/services/sqs.spec.coffee +130 -0
- package/test/services/sts.spec.coffee +72 -0
- package/test/services/swf.spec.coffee +6 -0
- package/test/signers/presign.spec.coffee +36 -0
- package/test/signers/s3.spec.coffee +297 -0
- package/test/signers/v2.spec.coffee +68 -0
- package/test/signers/v4.spec.coffee +135 -0
- package/test/util.spec.coffee +510 -0
- package/test/xml/builder.spec.coffee +529 -0
- package/test/xml/parser.spec.coffee +587 -0
- package/lib/services/simpledb.js +0 -15
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@iam", function (callback) {
|
|
3
|
+
this.iam = new this.AWS.IAM();
|
|
4
|
+
callback();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
this.Given(/^I have an IAM username "([^"]*)"$/, function(name, callback) {
|
|
8
|
+
this.iamUserArn = '';
|
|
9
|
+
this.iamUser = this.uniqueName(name);
|
|
10
|
+
callback();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
this.Given(/^I create an IAM user with the username$/, function(callback) {
|
|
14
|
+
var world = this;
|
|
15
|
+
var next = function() {
|
|
16
|
+
if (world.data) this.iamUserArn = world.data.User.Arn;
|
|
17
|
+
else this.iamUserArn = null;
|
|
18
|
+
callback();
|
|
19
|
+
};
|
|
20
|
+
next.fail = callback.fail;
|
|
21
|
+
this.request('iam', 'createUser', {UserName: this.iamUser}, next, false);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
this.Given(/^I list the IAM users$/, function(callback) {
|
|
25
|
+
this.request('iam', 'listUsers', {}, callback);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
this.Then(/^the list should contain the user$/, function(callback) {
|
|
29
|
+
var name = this.iamUser;
|
|
30
|
+
this.assert.contains(this.data.Users, function(user) {
|
|
31
|
+
return user.UserName === name;
|
|
32
|
+
});
|
|
33
|
+
callback();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
this.Then(/^I delete the IAM user$/, function(callback) {
|
|
37
|
+
this.request('iam', 'deleteUser', {UserName: this.iamUser}, callback);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
this.Given(/^I create an IAM role with name prefix "([^"]*)"$/, function(name, callback) {
|
|
41
|
+
this.iamRoleName = this.uniqueName(name);
|
|
42
|
+
|
|
43
|
+
var world = this;
|
|
44
|
+
var assumeRolePolicyDocument = '{"Version":"2008-10-17","Statement":[' +
|
|
45
|
+
'{"Effect":"Allow","Principal":{"Service":["ec2.amazonaws.com"]},' +
|
|
46
|
+
'"Action":["sts:AssumeRole"]}]}';
|
|
47
|
+
var params = {RoleName: this.iamRoleName,
|
|
48
|
+
AssumeRolePolicyDocument: assumeRolePolicyDocument};
|
|
49
|
+
var next = function() {
|
|
50
|
+
world.iamRoleArn = world.data.Role.Arn;
|
|
51
|
+
callback();
|
|
52
|
+
}
|
|
53
|
+
next.fail = callback.fail;
|
|
54
|
+
|
|
55
|
+
this.request('iam', 'createRole', params, next);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
this.Then(/^the IAM role should exist$/, function(callback) {
|
|
59
|
+
this.assert.compare(this.iamRoleArn.length, '>', 0);
|
|
60
|
+
callback();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
this.Then(/^I delete the IAM role$/, function(callback) {
|
|
64
|
+
this.request('iam', 'deleteRole', {RoleName: this.iamRoleName}, callback);
|
|
65
|
+
});
|
|
66
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@importexport @requiresakid
|
|
3
|
+
Feature: AWS Import/Export
|
|
4
|
+
|
|
5
|
+
I want to use AWS Import/Export
|
|
6
|
+
|
|
7
|
+
Scenario: Creating a job
|
|
8
|
+
Given I create a bucket
|
|
9
|
+
When I create an Import job with manifest:
|
|
10
|
+
"""
|
|
11
|
+
manifestVersion: 2.0
|
|
12
|
+
accessKeyId: {ACCESS_KEY_ID}
|
|
13
|
+
bucket: {BUCKET}
|
|
14
|
+
deviceId: ABCDE
|
|
15
|
+
generator: AWS ImportExport Web Service Tool 1.0
|
|
16
|
+
prefix: imported/
|
|
17
|
+
eraseDevice: yes
|
|
18
|
+
notificationEmail: invalid.address@example.com
|
|
19
|
+
returnAddress:
|
|
20
|
+
name: Joe Random
|
|
21
|
+
company: Amazon Web Services
|
|
22
|
+
street1: 123 Any Street
|
|
23
|
+
city: Seattle
|
|
24
|
+
stateOrProvince: WA
|
|
25
|
+
postalCode: 91111
|
|
26
|
+
phoneNumber: 555-555-0100
|
|
27
|
+
country: USA
|
|
28
|
+
serviceLevel: expeditedShipping
|
|
29
|
+
"""
|
|
30
|
+
And I store the Import job ID
|
|
31
|
+
And I get the Import job status
|
|
32
|
+
Then the result should contain a property CreationDate with a Date
|
|
33
|
+
And I cancel the Import job
|
|
34
|
+
And the result should contain Success with expression true
|
|
35
|
+
And I get the Import job status
|
|
36
|
+
Then the result should contain ProgressCode with string value "Canceled"
|
|
37
|
+
And I delete the bucket
|
|
38
|
+
|
|
39
|
+
Scenario: Listing jobs
|
|
40
|
+
When I list Import/Export jobs
|
|
41
|
+
Then the result should contain a property IsTruncated with a boolean
|
|
42
|
+
And the result should contain a property Jobs with an Array
|
|
43
|
+
|
|
44
|
+
Scenario: Error handling
|
|
45
|
+
When I create an Import job with manifest:
|
|
46
|
+
"""
|
|
47
|
+
INVALID MANIFEST
|
|
48
|
+
"""
|
|
49
|
+
Then the error code should be "MalformedManifestException"
|
|
50
|
+
And the error message should be:
|
|
51
|
+
"""
|
|
52
|
+
Your manifest is not well-formed
|
|
53
|
+
"""
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@importexport", function (callback) {
|
|
3
|
+
this.s3 = new this.AWS.S3();
|
|
4
|
+
this.service = new this.AWS.ImportExport();
|
|
5
|
+
callback();
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
this.When(/^I create an (Import|Export) job with manifest:$/, function(type, manifest, callback) {
|
|
9
|
+
manifest = manifest.replace('{ACCESS_KEY_ID}', this.service.config.credentials.accessKeyId);
|
|
10
|
+
manifest = manifest.replace('{BUCKET}', this.bucket);
|
|
11
|
+
var params = {JobType: type, Manifest: manifest, ValidateOnly: false};
|
|
12
|
+
this.request(null, 'createJob', params, callback, false);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
this.When(/^I store the Import job ID$/, function(callback) {
|
|
16
|
+
this.jobId = this.data.JobId;
|
|
17
|
+
callback();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
this.Then(/^the result should contain (\S+) with expression (.+)$/, function(property, expr, callback) {
|
|
21
|
+
this.assert.equal(this.data[property], eval(expr));
|
|
22
|
+
callback();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
this.Then(/^the result should contain (\S+) with string value "([^"]*)"$/, function(property, value, callback) {
|
|
26
|
+
this.assert.equal(this.data[property], value);
|
|
27
|
+
callback();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
this.When(/^I get the Import job status$/, function(callback) {
|
|
31
|
+
this.request(null, 'getStatus', {JobId: this.jobId}, callback);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
this.When(/^I cancel the Import job$/, function(callback) {
|
|
35
|
+
var params = {JobId: this.jobId};
|
|
36
|
+
this.request(null, 'cancelJob', params, callback);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
this.When(/^I list Import\/Export jobs$/, function(callback) {
|
|
40
|
+
this.request(null, 'listJobs', {}, callback);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@kinesis", function (callback) {
|
|
3
|
+
this.service = new this.AWS.Kinesis();
|
|
4
|
+
callback();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
this.Given(/^I try to describe a stream in Kinesis$/, function(callback) {
|
|
8
|
+
this.request(null, 'describeStream', {StreamName: 'XXINVALIDXX'}, callback, false);
|
|
9
|
+
});
|
|
10
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@opsworks
|
|
3
|
+
Feature: AWS OpsWorks
|
|
4
|
+
|
|
5
|
+
I want to use AWS OpsWorks
|
|
6
|
+
|
|
7
|
+
Scenario: Creating and deleting user profiles
|
|
8
|
+
Given I have an IAM username "aws-js-sdk"
|
|
9
|
+
And I create an IAM user with the username
|
|
10
|
+
And I create an OpsWorks user profile with the IAM user ARN
|
|
11
|
+
And the IAM user ARN is in the result
|
|
12
|
+
And I describe the OpsWorks user profiles
|
|
13
|
+
Then the IAM user ARN should be in the result
|
|
14
|
+
And the name should be equal to the IAM username
|
|
15
|
+
And the SSH username should be equal to the IAM username
|
|
16
|
+
And I delete the OpsWorks user profile
|
|
17
|
+
And I delete the IAM user
|
|
18
|
+
|
|
19
|
+
Scenario: Error handling
|
|
20
|
+
Given I have an IAM username ""
|
|
21
|
+
And I create an OpsWorks user profile with the IAM user ARN
|
|
22
|
+
Then the error code should be "ValidationException"
|
|
23
|
+
Then the error message should be:
|
|
24
|
+
"""
|
|
25
|
+
Please provide user ARN
|
|
26
|
+
"""
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@opsworks", function (callback) {
|
|
3
|
+
this.iam = new this.AWS.IAM();
|
|
4
|
+
this.service = new this.AWS.OpsWorks();
|
|
5
|
+
callback();
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
this.Given(/^I create an OpsWorks user profile with the IAM user ARN$/, function(callback) {
|
|
9
|
+
var params = {IamUserArn: this.iamUserArn};
|
|
10
|
+
this.request(null, 'createUserProfile', params, callback, false);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
this.Given(/^the IAM user ARN is in the result$/, function(callback) {
|
|
14
|
+
this.assert.equal(this.data.IamUserArn, this.iamUserArn);
|
|
15
|
+
callback();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
this.Given(/^I describe the OpsWorks user profiles$/, function(callback) {
|
|
19
|
+
var params = {IamUserArns: [this.iamUserArn]};
|
|
20
|
+
this.request(null, 'describeUserProfiles', params, callback);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
this.Then(/^the IAM user ARN should be in the result$/, function(callback) {
|
|
24
|
+
this.assert.equal(this.data.UserProfiles[0].IamUserArn, this.iamUserArn);
|
|
25
|
+
callback();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
this.Then(/^the name should be equal to the IAM username$/, function(callback) {
|
|
29
|
+
this.assert.equal(this.data.UserProfiles[0].Name, this.iamUser);
|
|
30
|
+
callback();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
this.Then(/^the SSH username should be equal to the IAM username$/, function(callback) {
|
|
34
|
+
this.assert.equal(this.data.UserProfiles[0].SshUsername, this.iamUser);
|
|
35
|
+
callback();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
this.Then(/^I delete the OpsWorks user profile$/, function(callback) {
|
|
39
|
+
var params = {IamUserArn: this.iamUserArn};
|
|
40
|
+
this.request(null, 'deleteUserProfile', params, callback, false);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@rds
|
|
3
|
+
Feature: Amazon Relational Database Service
|
|
4
|
+
|
|
5
|
+
I want to use Amazon Relational Database Service
|
|
6
|
+
|
|
7
|
+
Scenario: Creating and deleting security groups
|
|
8
|
+
Given I create a RDS security group with prefix name "aws-js-sdk"
|
|
9
|
+
And the RDS security group name is in the result
|
|
10
|
+
And I describe the RDS security group
|
|
11
|
+
Then the RDS security group should be described
|
|
12
|
+
And I delete the RDS security group
|
|
13
|
+
|
|
14
|
+
Scenario: Error handling
|
|
15
|
+
Given I create a RDS security group with prefix name ""
|
|
16
|
+
Then the error code should be "InvalidParameterValue"
|
|
17
|
+
Then the error message should be:
|
|
18
|
+
"""
|
|
19
|
+
DBSecurityGroupName is required
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
@pagination
|
|
23
|
+
Scenario: Paginating responses
|
|
24
|
+
Given I paginate the "describeReservedDBInstancesOfferings" operation with limit 100
|
|
25
|
+
Then I should get more than one page
|
|
26
|
+
And I should get numPages - 1 markers
|
|
27
|
+
And the last page should not contain a marker
|
|
28
|
+
|
|
29
|
+
@pagination
|
|
30
|
+
Scenario: Paginating responses (with callback)
|
|
31
|
+
Given I paginate the "describeReservedDBInstancesOfferings" operation asynchronously with limit 100
|
|
32
|
+
Then I should be able to asynchronously paginate all pages
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@rds", function (callback) {
|
|
3
|
+
this.service = new this.AWS.RDS();
|
|
4
|
+
callback();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
this.Given(/^I create a RDS security group with prefix name "([^"]*)"$/, function(prefix, callback) {
|
|
8
|
+
this.dbGroupName = this.uniqueName(prefix);
|
|
9
|
+
var params = { DBSecurityGroupDescription: 'Description', DBSecurityGroupName: this.dbGroupName };
|
|
10
|
+
this.request(null, 'createDBSecurityGroup', params, callback, false);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
this.Given(/^the RDS security group name is in the result$/, function(callback) {
|
|
14
|
+
var name = this.data.DBSecurityGroup.DBSecurityGroupName;
|
|
15
|
+
this.assert.equal(name, this.dbGroupName);
|
|
16
|
+
callback();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
this.Given(/^I describe the RDS security group$/, function(callback) {
|
|
20
|
+
var params = {DBSecurityGroupName: this.dbGroupName};
|
|
21
|
+
this.request(null, 'describeDBSecurityGroups', params, callback);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
this.Then(/^the RDS security group should be described$/, function(callback) {
|
|
25
|
+
var item = this.data.DBSecurityGroups[0];
|
|
26
|
+
this.assert.equal(item.DBSecurityGroupName, this.dbGroupName);
|
|
27
|
+
callback();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
this.Then(/^I delete the RDS security group$/, function(callback) {
|
|
31
|
+
var params = {DBSecurityGroupName: this.dbGroupName};
|
|
32
|
+
this.request(null, 'deleteDBSecurityGroup', params, callback);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
this.Given(/^I paginate the "([^"]*)" operation asynchronously with limit (\d+)$/, function (operation, limit, callback) {
|
|
36
|
+
var maxPages = 3;
|
|
37
|
+
limit = parseInt(limit);
|
|
38
|
+
|
|
39
|
+
var world = this;
|
|
40
|
+
this.numPages = 0;
|
|
41
|
+
this.numMarkers = 0
|
|
42
|
+
this.operation = operation;
|
|
43
|
+
this.paginationConfig = this.service.paginationConfig(operation);
|
|
44
|
+
this.params = this.params || {};
|
|
45
|
+
this.finishedPagination = false;
|
|
46
|
+
|
|
47
|
+
var marker = this.paginationConfig.outputToken;
|
|
48
|
+
if (this.paginationConfig.limitKey) {
|
|
49
|
+
this.params[this.paginationConfig.limitKey] = limit;
|
|
50
|
+
}
|
|
51
|
+
this.service[operation](this.params).eachPage(function (err, data, done) {
|
|
52
|
+
process.nextTick(function() {
|
|
53
|
+
if (err) callback.fail(err);
|
|
54
|
+
else if (data === null || world.numPages === maxPages) {
|
|
55
|
+
world.finishedPagination = true;
|
|
56
|
+
callback();
|
|
57
|
+
} else {
|
|
58
|
+
if (data[marker]) world.numMarkers++;
|
|
59
|
+
world.numPages++;
|
|
60
|
+
world.data = data;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
done(); // start getting next page
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
this.Then(/^I should be able to asynchronously paginate all pages$/, function (callback) {
|
|
69
|
+
this.assert.equal(this.finishedPagination, true);
|
|
70
|
+
callback();
|
|
71
|
+
});
|
|
72
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@redshift
|
|
3
|
+
Feature: Amazon Redshift
|
|
4
|
+
|
|
5
|
+
I want to use Amazon Redshift
|
|
6
|
+
|
|
7
|
+
Scenario: Creating and deleting cluster security groups
|
|
8
|
+
Given I create a Redshift cluster security group with prefix name "aws-js-sdk"
|
|
9
|
+
And the Redshift cluster security group name is in the result
|
|
10
|
+
And I describe Redshift cluster security groups
|
|
11
|
+
Then the Redshift cluster security group should be in the list
|
|
12
|
+
And I delete the Redshift cluster security group
|
|
13
|
+
|
|
14
|
+
Scenario: Error handling
|
|
15
|
+
Given I create a Redshift cluster security group with prefix name ""
|
|
16
|
+
Then the error code should be "InvalidParameterValue"
|
|
17
|
+
Then the error message should be:
|
|
18
|
+
"""
|
|
19
|
+
ClusterSecurityGroupName is required
|
|
20
|
+
"""
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@redshift", function (callback) {
|
|
3
|
+
this.service = new this.AWS.Redshift();
|
|
4
|
+
callback();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
this.Given(/^I create a Redshift cluster security group with prefix name "([^"]*)"$/, function(prefix, callback) {
|
|
8
|
+
this.clusterGroupName = this.uniqueName(prefix);
|
|
9
|
+
var params = { Description: 'Description', ClusterSecurityGroupName: this.clusterGroupName };
|
|
10
|
+
this.request(null, 'createClusterSecurityGroup', params, callback, false);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
this.Given(/^the Redshift cluster security group name is in the result$/, function(callback) {
|
|
14
|
+
var name = this.data.ClusterSecurityGroup.ClusterSecurityGroupName;
|
|
15
|
+
this.assert.equal(name, this.clusterGroupName);
|
|
16
|
+
callback();
|
|
17
|
+
});
|
|
18
|
+
this.Given(/^I describe Redshift cluster security groups$/, function(callback) {
|
|
19
|
+
var params = {ClusterSecurityGroupName: this.clusterGroupName};
|
|
20
|
+
this.request(null, 'describeClusterSecurityGroups', params, callback);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
this.Then(/^the Redshift cluster security group should be in the list$/, function(callback) {
|
|
24
|
+
var item = this.data.ClusterSecurityGroups[0];
|
|
25
|
+
this.assert.equal(item.ClusterSecurityGroupName, this.clusterGroupName);
|
|
26
|
+
callback();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
this.Then(/^I delete the Redshift cluster security group$/, function(callback) {
|
|
30
|
+
var params = {ClusterSecurityGroupName: this.clusterGroupName};
|
|
31
|
+
this.request(null, 'deleteClusterSecurityGroup', params, callback);
|
|
32
|
+
});
|
|
33
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@route53
|
|
3
|
+
Feature: Amazon Route 53
|
|
4
|
+
|
|
5
|
+
I want to use Amazon Route 53
|
|
6
|
+
|
|
7
|
+
Scenario: Managing hosted zones
|
|
8
|
+
When I create a Route53 hosted zone with name prefix "aws-sdk-js"
|
|
9
|
+
Then the result should contain the hosted zone ID
|
|
10
|
+
And the result should contain the change ID
|
|
11
|
+
And the result should contain the hosted zone name
|
|
12
|
+
|
|
13
|
+
When I get information about the Route53 change ID
|
|
14
|
+
Then the change status should be PENDING or INSYNC
|
|
15
|
+
|
|
16
|
+
When I get information about the Route53 hosted zone ID
|
|
17
|
+
Then the result should contain multiple nameservers
|
|
18
|
+
|
|
19
|
+
And I delete the Route53 hosted zone
|
|
20
|
+
|
|
21
|
+
Scenario: Managing health checks
|
|
22
|
+
When I create a Route53 TCP health check with name prefix "aws-sdk-js"
|
|
23
|
+
Then the result should contain health check information
|
|
24
|
+
And the result should contain the health check ID
|
|
25
|
+
|
|
26
|
+
When I get information about the health check ID
|
|
27
|
+
Then the result should contain the previous health check information
|
|
28
|
+
|
|
29
|
+
And I delete the Route53 TCP health check
|
|
30
|
+
|
|
31
|
+
Scenario: Type checking
|
|
32
|
+
When I list Route53 hosted zones
|
|
33
|
+
And the result should contain a property HostedZones with an Array
|
|
34
|
+
|
|
35
|
+
Scenario: Error handling
|
|
36
|
+
When I create a Route53 hosted zone with name prefix ""
|
|
37
|
+
Then the error code should be "InvalidInput"
|
|
38
|
+
And the error message should match:
|
|
39
|
+
"""
|
|
40
|
+
Member must have length greater than or equal to 1
|
|
41
|
+
"""
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@route53", function (callback) {
|
|
3
|
+
this.service = new this.AWS.Route53();
|
|
4
|
+
callback();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
this.When(/^I create a Route53 hosted zone with name prefix "([^"]*)"$/, function(prefix, callback) {
|
|
8
|
+
this.zoneName = 'zone1.example.com';
|
|
9
|
+
var params = {
|
|
10
|
+
Name: this.zoneName,
|
|
11
|
+
CallerReference: this.uniqueName(prefix),
|
|
12
|
+
HostedZoneConfig: {
|
|
13
|
+
Comment: 'A comment about the zone'
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
this.request(null, 'createHostedZone', params, callback, false);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
this.Then(/^the result should contain the hosted zone ID$/, function(callback) {
|
|
20
|
+
this.hostedZoneId = this.data.HostedZone.Id;
|
|
21
|
+
callback();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
this.Then(/^the result should contain the change ID$/, function(callback) {
|
|
25
|
+
this.changeInfoId = this.data.ChangeInfo.Id;
|
|
26
|
+
callback();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
this.Then(/^the result should contain the hosted zone name$/, function(callback) {
|
|
30
|
+
this.assert.equal(this.data.HostedZone.Name, this.zoneName + '.');
|
|
31
|
+
callback();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
this.When(/^I get information about the Route53 change ID$/, function(callback) {
|
|
35
|
+
this.request(null, 'getChange', {Id: this.changeInfoId}, callback);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
this.Then(/^the change status should be PENDING or INSYNC$/, function(callback) {
|
|
39
|
+
this.assert.match(this.data.ChangeInfo.Status, /^(PENDING|INSYNC)$/);
|
|
40
|
+
callback();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
this.When(/^I get information about the Route53 hosted zone ID$/, function(callback) {
|
|
44
|
+
this.request(null, 'getHostedZone', {Id: this.hostedZoneId}, callback);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
this.Then(/^the result should contain multiple nameservers$/, function(callback) {
|
|
48
|
+
this.assert.compare(this.data.DelegationSet.NameServers.length, '>=', 0);
|
|
49
|
+
this.assert.equal(typeof this.data.DelegationSet.NameServers[0], 'string');
|
|
50
|
+
callback();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
this.Then(/^I delete the Route53 hosted zone$/, function(callback) {
|
|
54
|
+
this.request(null, 'deleteHostedZone', {Id: this.hostedZoneId}, callback);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
this.When(/^I create a Route53 TCP health check with name prefix "([^"]*)"$/, function(prefix, callback) {
|
|
58
|
+
var params = {
|
|
59
|
+
CallerReference: this.uniqueName(prefix),
|
|
60
|
+
HealthCheckConfig: {
|
|
61
|
+
IPAddress: '192.0.43.10', // example.com
|
|
62
|
+
Port: 80,
|
|
63
|
+
Type: 'TCP'
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
this.request(null, 'createHealthCheck', params, callback);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
this.Then(/^the result should contain health check information$/, function(callback) {
|
|
70
|
+
this.healthCheckInfo = this.data.HealthCheck;
|
|
71
|
+
callback();
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
this.Then(/^the result should contain the health check ID$/, function(callback) {
|
|
75
|
+
this.healthCheckId = this.data.HealthCheck.Id;
|
|
76
|
+
callback();
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
this.When(/^I get information about the health check ID$/, function(callback) {
|
|
80
|
+
var params = {HealthCheckId: this.healthCheckId};
|
|
81
|
+
this.request(null, 'getHealthCheck', params, callback);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
this.Then(/^the result should contain the previous health check information$/, function(callback) {
|
|
85
|
+
this.assert.deepEqual(this.data.HealthCheck, this.healthCheckInfo);
|
|
86
|
+
callback();
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
this.Then(/^I delete the Route53 TCP health check$/, function(callback) {
|
|
90
|
+
var params = {HealthCheckId: this.healthCheckId};
|
|
91
|
+
this.request(null, 'deleteHealthCheck', params, callback);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
this.When(/^I list Route53 hosted zones$/, function(callback) {
|
|
95
|
+
this.request(null, 'listHostedZones', {}, callback);
|
|
96
|
+
});
|
|
97
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@s3 @buckets
|
|
3
|
+
Feature: Working with Buckets
|
|
4
|
+
|
|
5
|
+
Scenario: CRUD buckets
|
|
6
|
+
When I create a bucket
|
|
7
|
+
Then the bucket should exist
|
|
8
|
+
When I delete the bucket
|
|
9
|
+
Then the bucket should not exist
|
|
10
|
+
|
|
11
|
+
@cors
|
|
12
|
+
Scenario: Bucket CORS
|
|
13
|
+
When I create a bucket
|
|
14
|
+
And I put a bucket CORS configuration
|
|
15
|
+
And I get the bucket CORS configuration
|
|
16
|
+
Then the AllowedMethods list should inclue "DELETE POST PUT"
|
|
17
|
+
Then the AllowedOrigin value should equal "http://example.com"
|
|
18
|
+
Then the AllowedHeader value should equal "*"
|
|
19
|
+
Then the ExposeHeader value should equal "x-amz-server-side-encryption"
|
|
20
|
+
Then the MaxAgeSeconds value should equal 5000
|
|
21
|
+
|
|
22
|
+
@lifecycle
|
|
23
|
+
Scenario: Bucket lifecycles
|
|
24
|
+
When I create a bucket
|
|
25
|
+
And I put a transition lifecycle configuration on the bucket with prefix "/"
|
|
26
|
+
And I get the transition lifecycle configuration on the bucket
|
|
27
|
+
Then the lifecycle configuration should have transition days of 0
|
|
28
|
+
And the lifecycle configuration should have transition storage class of "GLACIER"
|
|
29
|
+
|
|
30
|
+
@tagging
|
|
31
|
+
Scenario: Bucket Tagging
|
|
32
|
+
When I create a bucket
|
|
33
|
+
And I put a bucket tag with key "KEY" and value "VALUE"
|
|
34
|
+
And I get the bucket tagging
|
|
35
|
+
Then the first tag in the tag set should have key and value "KEY", "VALUE"
|
|
36
|
+
|
|
37
|
+
# this test will exercise following 307 redirects
|
|
38
|
+
# Scenario: Creating a bucket with a location constraint
|
|
39
|
+
# When I create a bucket with the location constraint "EU"
|
|
40
|
+
# Then the bucket should have a location constraint of "EU"
|