aws-sdk-core 2.0.0.rc12 → 2.0.0
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/AutoScaling.api.json +1943 -0
- data/apis/CloudFormation.api.json +785 -0
- data/apis/CloudFront.api.json +2581 -0
- data/apis/CloudFront.paginators.json +32 -0
- data/apis/CloudSearch.api.json +1955 -0
- data/apis/CloudSearchDomain.api.json +349 -0
- data/apis/CloudTrail.api.json +559 -0
- data/apis/CloudWatch.api.json +917 -0
- data/apis/CloudWatchLogs.api.json +816 -0
- data/apis/CognitoIdentity.api.json +631 -0
- data/apis/CognitoSync.api.json +721 -0
- data/apis/DataPipeline.api.json +940 -0
- data/apis/DirectConnect.api.json +833 -0
- data/apis/DynamoDB.api.json +1210 -0
- data/apis/{dynamodb-2011-12-05.paginators.json → DynamoDB.paginators.json} +1 -3
- data/apis/EC2.api.json +9914 -0
- data/apis/{ec2-2014-06-15.resources.json → EC2.resources.json} +16 -0
- data/apis/EMR.api.json +1339 -0
- data/apis/ElastiCache.api.json +3410 -0
- data/apis/ElasticBeanstalk.api.json +1543 -0
- data/apis/ElasticLoadBalancing.api.json +2131 -0
- data/apis/ElasticTranscoder.api.json +1647 -0
- data/apis/Glacier.api.json +1456 -0
- data/apis/{glacier-2012-06-01.resources.json → Glacier.resources.json} +5 -9
- data/apis/IAM.api.json +4033 -0
- data/apis/{iam-2010-05-08.resources.json → IAM.resources.json} +1 -1
- data/apis/ImportExport.api.json +515 -0
- data/apis/Kinesis.api.json +706 -0
- data/apis/{kinesis-2013-12-02.paginators.json → Kinesis.paginators.json} +0 -6
- data/apis/OpsWorks.api.json +2555 -0
- data/apis/OpsWorks.resources.json +181 -0
- data/apis/RDS.api.json +4473 -0
- data/apis/Redshift.api.json +4482 -0
- data/apis/Route53.api.json +1935 -0
- data/apis/Route53Domains.api.json +1129 -0
- data/apis/{s3-2006-03-01.api.json → S3.api.json} +377 -972
- data/apis/{s3-2006-03-01.paginators.json → S3.paginators.json} +1 -1
- data/apis/{s3-2006-03-01.resources.json → S3.resources.json} +13 -2
- data/apis/SES.api.json +644 -0
- data/apis/SNS.api.json +1760 -0
- data/apis/SQS.api.json +1113 -0
- data/apis/{sqs-2012-11-05.resources.json → SQS.resources.json} +0 -10
- data/apis/STS.api.json +594 -0
- data/apis/SWF.api.json +2656 -0
- data/apis/SimpleDB.api.json +954 -0
- data/apis/StorageGateway.api.json +2311 -0
- data/apis/Support.api.json +869 -0
- data/bin/aws.rb +19 -1
- data/endpoints.json +77 -0
- data/lib/aws-sdk-core/api/docstrings.rb +35 -0
- data/lib/aws-sdk-core/api/documenter.rb +241 -0
- data/lib/{aws/api/documentor.rb → aws-sdk-core/api/operation_documenter.rb} +39 -28
- data/lib/{aws/api/doc_example.rb → aws-sdk-core/api/operation_example.rb} +31 -22
- data/lib/{aws → aws-sdk-core}/api/service_customizations.rb +5 -1
- data/lib/aws-sdk-core/autoscaling.rb +5 -0
- data/lib/aws-sdk-core/client.rb +121 -0
- data/lib/aws-sdk-core/cloudformation.rb +5 -0
- data/lib/aws-sdk-core/cloudfront.rb +6 -0
- data/lib/aws-sdk-core/cloudsearch.rb +5 -0
- data/lib/aws-sdk-core/cloudsearchdomain.rb +4 -0
- data/lib/aws-sdk-core/cloudtrail.rb +5 -0
- data/lib/aws-sdk-core/cloudwatch.rb +5 -0
- data/lib/aws-sdk-core/cloudwatchlogs.rb +5 -0
- data/lib/aws-sdk-core/cognitoidentity.rb +4 -0
- data/lib/aws-sdk-core/cognitosync.rb +4 -0
- data/lib/{aws → aws-sdk-core}/credential_provider_chain.rb +4 -1
- data/lib/aws-sdk-core/datapipeline.rb +5 -0
- data/lib/aws-sdk-core/directconnect.rb +5 -0
- data/lib/aws-sdk-core/dynamodb/attribute_value.rb +87 -0
- data/lib/aws-sdk-core/dynamodb.rb +12 -0
- data/lib/aws-sdk-core/ec2.rb +7 -0
- data/lib/aws-sdk-core/elasticache.rb +5 -0
- data/lib/aws-sdk-core/elasticbeanstalk.rb +5 -0
- data/lib/aws-sdk-core/elasticloadbalancing.rb +5 -0
- data/lib/aws-sdk-core/elastictranscoder.rb +5 -0
- data/lib/{aws → aws-sdk-core}/empty_structure.rb +4 -3
- data/lib/aws-sdk-core/emr.rb +5 -0
- data/lib/aws-sdk-core/endpoint_provider.rb +97 -0
- data/lib/{aws → aws-sdk-core}/errors.rb +27 -8
- data/lib/aws-sdk-core/glacier.rb +7 -0
- data/lib/aws-sdk-core/iam.rb +6 -0
- data/lib/aws-sdk-core/importexport.rb +5 -0
- data/lib/{aws → aws-sdk-core}/instance_profile_credentials.rb +13 -9
- data/lib/aws-sdk-core/kinesis.rb +5 -0
- data/lib/aws-sdk-core/opsworks.rb +6 -0
- data/lib/{aws → aws-sdk-core}/pageable_response.rb +1 -1
- data/lib/aws-sdk-core/plugins/csd_conditional_signing.rb +37 -0
- data/lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb +179 -0
- data/lib/{aws → aws-sdk-core}/plugins/global_configuration.rb +14 -7
- data/lib/{aws → aws-sdk-core}/plugins/protocols/json_rpc.rb +9 -7
- data/lib/{aws → aws-sdk-core}/plugins/regional_endpoint.rb +2 -4
- data/lib/{aws → aws-sdk-core}/plugins/request_signer.rb +18 -8
- data/lib/aws-sdk-core/plugins/response_paging.rb +25 -0
- data/lib/{aws → aws-sdk-core}/plugins/retry_errors.rb +11 -1
- data/lib/aws-sdk-core/plugins/route_53_id_fix.rb +55 -0
- data/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb +27 -0
- data/lib/aws-sdk-core/plugins/s3_sse_cpk.rb +63 -0
- data/lib/aws-sdk-core/plugins/s3_url_encoded_keys.rb +92 -0
- data/lib/{aws → aws-sdk-core}/plugins/user_agent.rb +1 -2
- data/lib/{aws → aws-sdk-core}/query/handler.rb +4 -5
- data/lib/aws-sdk-core/rds.rb +6 -0
- data/lib/aws-sdk-core/redshift.rb +6 -0
- data/lib/aws-sdk-core/route53.rb +5 -0
- data/lib/aws-sdk-core/route53domains.rb +4 -0
- data/lib/aws-sdk-core/s3/presigner.rb +64 -0
- data/lib/aws-sdk-core/s3.rb +13 -0
- data/lib/aws-sdk-core/service.rb +4 -0
- data/lib/aws-sdk-core/ses.rb +6 -0
- data/lib/{aws → aws-sdk-core}/signers/v4.rb +6 -5
- data/lib/aws-sdk-core/simpledb.rb +5 -0
- data/lib/aws-sdk-core/sns.rb +6 -0
- data/lib/aws-sdk-core/sqs.rb +6 -0
- data/lib/aws-sdk-core/storagegateway.rb +5 -0
- data/lib/{aws → aws-sdk-core}/structure.rb +60 -4
- data/lib/aws-sdk-core/sts.rb +4 -0
- data/lib/aws-sdk-core/support.rb +5 -0
- data/lib/aws-sdk-core/swf.rb +5 -0
- data/lib/aws-sdk-core/version.rb +3 -0
- data/lib/aws-sdk-core/waiters/errors.rb +30 -0
- data/lib/aws-sdk-core/waiters/null_provider.rb +12 -0
- data/lib/aws-sdk-core/waiters/provider.rb +54 -0
- data/lib/aws-sdk-core/waiters/waiter.rb +194 -0
- data/lib/{aws → aws-sdk-core}/xml/builder.rb +4 -3
- data/lib/aws-sdk-core/xml/default_list.rb +10 -0
- data/lib/{aws → aws-sdk-core}/xml/parser.rb +6 -1
- data/lib/aws-sdk-core.rb +288 -1
- data/{vendor/seahorse/lib → lib}/seahorse/client/base.rb +45 -20
- data/{vendor/seahorse/lib → lib}/seahorse/client/handler_list.rb +17 -3
- data/{vendor/seahorse/lib → lib}/seahorse/client/http/error.rb +2 -2
- data/{vendor/seahorse/lib → lib}/seahorse/client/http/request.rb +1 -9
- data/{vendor/seahorse/lib → lib}/seahorse/client/net_http/connection_pool.rb +2 -0
- data/{vendor/seahorse/lib → lib}/seahorse/client/net_http/handler.rb +13 -1
- data/lib/seahorse/client/net_http/patches.rb +97 -0
- data/{vendor/seahorse/lib → lib}/seahorse/client/param_converter.rb +2 -2
- data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/endpoint.rb +24 -15
- data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/restful_bindings.rb +1 -1
- data/{vendor/seahorse/lib → lib}/seahorse/client/request.rb +1 -1
- data/{vendor/seahorse/lib → lib}/seahorse/client/response.rb +0 -2
- data/{vendor/seahorse/lib → lib}/seahorse/client/xml/builder.rb +0 -1
- data/{vendor/seahorse/lib → lib}/seahorse/model/shape_map.rb +1 -0
- data/{vendor/seahorse/lib → lib}/seahorse/model/shapes.rb +13 -4
- data/{vendor/seahorse/lib → lib}/seahorse.rb +3 -3
- metadata +257 -593
- data/.gitignore +0 -8
- data/.simplecov +0 -6
- data/.travis.yml +0 -20
- data/.yardopts +0 -11
- data/Gemfile +0 -26
- data/LICENSE.txt +0 -12
- data/README.md +0 -250
- data/Rakefile +0 -17
- data/apis/autoscaling-2011-01-01.api.json +0 -2602
- data/apis/cloudformation-2010-05-15.api.json +0 -1306
- data/apis/cloudfront-2014-01-31.api.json +0 -3478
- data/apis/cloudfront-2014-01-31.paginators.json +0 -32
- data/apis/cloudfront-2014-05-31.api.json +0 -3540
- data/apis/cloudfront-2014-05-31.paginators.json +0 -32
- data/apis/cloudfront-2014-05-31.waiters.json +0 -29
- data/apis/cloudsearch-2011-02-01.api.json +0 -2093
- data/apis/cloudsearch-2011-02-01.paginators.json +0 -13
- data/apis/cloudsearch-2013-01-01.api.json +0 -2655
- data/apis/cloudsearchdomain-2013-01-01.api.json +0 -508
- data/apis/cloudtrail-2013-11-01.api.json +0 -773
- data/apis/cognito-identity-2014-06-30.api.json +0 -884
- data/apis/cognito-sync-2014-06-30.api.json +0 -1029
- data/apis/datapipeline-2012-10-29.api.json +0 -1432
- data/apis/directconnect-2012-10-25.api.json +0 -1174
- data/apis/dynamodb-2011-12-05.api.json +0 -1208
- data/apis/dynamodb-2011-12-05.waiters.json +0 -27
- data/apis/dynamodb-2012-08-10.api.json +0 -1857
- data/apis/dynamodb-2012-08-10.paginators.json +0 -27
- data/apis/ec2-2014-06-15.api.json +0 -11661
- data/apis/elasticache-2014-03-24.api.json +0 -4789
- data/apis/elasticbeanstalk-2010-12-01.api.json +0 -2442
- data/apis/elasticloadbalancing-2012-06-01.api.json +0 -2576
- data/apis/elasticmapreduce-2009-03-31.api.json +0 -2282
- data/apis/elastictranscoder-2012-09-25.api.json +0 -2478
- data/apis/email-2010-12-01.api.json +0 -954
- data/apis/endpoints.json +0 -98
- data/apis/glacier-2012-06-01.api.json +0 -2012
- data/apis/iam-2010-05-08.api.json +0 -5046
- data/apis/importexport-2010-06-01.api.json +0 -687
- data/apis/kinesis-2013-12-02.api.json +0 -769
- data/apis/logs-2014-03-28.api.json +0 -942
- data/apis/manifest.json +0 -250
- data/apis/monitoring-2010-08-01.api.json +0 -1338
- data/apis/opsworks-2013-02-18.api.json +0 -4348
- data/apis/rds-2013-01-10.api.json +0 -6074
- data/apis/rds-2013-02-12.api.json +0 -6392
- data/apis/rds-2013-02-12.paginators.json +0 -110
- data/apis/rds-2013-09-09.api.json +0 -6564
- data/apis/rds-2013-09-09.paginators.json +0 -110
- data/apis/redshift-2012-12-01.api.json +0 -6318
- data/apis/route53-2013-04-01.api.json +0 -1927
- data/apis/sdb-2009-04-15.api.json +0 -1178
- data/apis/sns-2010-03-31.api.json +0 -2275
- data/apis/sqs-2012-11-05.api.json +0 -1438
- data/apis/storagegateway-2013-06-30.api.json +0 -3153
- data/apis/sts-2011-06-15.api.json +0 -786
- data/apis/support-2013-04-15.api.json +0 -1115
- data/apis/swf-2012-01-25.api.json +0 -4463
- data/aws-sdk-core.gemspec +0 -22
- data/doc-src/images/lastnode.png +0 -0
- data/doc-src/images/node.png +0 -0
- data/doc-src/images/vline.png +0 -0
- data/doc-src/plugins/apis.rb +0 -260
- data/doc-src/plugins/stability.rb +0 -1
- data/doc-src/services/CloudSearchDomain/client.md +0 -8
- data/doc-src/services/CloudSearchDomain/service.md +0 -0
- data/doc-src/services/default/client.md +0 -84
- data/doc-src/services/default/errors.md +0 -45
- data/doc-src/services/default/service.md +0 -28
- data/doc-src/templates/default/fulldoc/html/css/common.css +0 -90
- data/doc-src/templates/default/fulldoc/html/js/tabs.js +0 -21
- data/doc-src/templates/default/fulldoc/html/setup.rb +0 -66
- data/doc-src/templates/default/layout/html/footer.erb +0 -29
- data/doc-src/templates/default/layout/html/layout.erb +0 -37
- data/doc-src/templates/default/layout/html/setup.rb +0 -3
- data/features/autoscaling/client.feature +0 -18
- data/features/autoscaling/step_definitions.rb +0 -6
- data/features/cloudformation/client.feature +0 -17
- data/features/cloudformation/step_definitions.rb +0 -6
- data/features/cloudfront/client.feature +0 -17
- data/features/cloudfront/step_definitions.rb +0 -6
- data/features/cloudsearch/client.feature +0 -16
- data/features/cloudsearch/step_definitions.rb +0 -6
- data/features/cloudtrail/client.feature +0 -16
- data/features/cloudtrail/step_definitions.rb +0 -6
- data/features/cloudwatch/client.feature +0 -19
- data/features/cloudwatch/step_definitions.rb +0 -6
- data/features/cloudwatchlogs/client.feature +0 -17
- data/features/cloudwatchlogs/step_definitions.rb +0 -6
- data/features/cognitoidentity/client.feature +0 -17
- data/features/cognitoidentity/step_definitions.rb +0 -6
- data/features/cognitosync/client.feature +0 -16
- data/features/cognitosync/step_definitions.rb +0 -6
- data/features/datapipeline/client.feature +0 -16
- data/features/datapipeline/step_definitions.rb +0 -6
- data/features/directconnect/client.feature +0 -16
- data/features/directconnect/step_definitions.rb +0 -6
- data/features/dynamodb/client.feature +0 -17
- data/features/dynamodb/simplified.feature +0 -32
- data/features/dynamodb/step_definitions.rb +0 -11
- data/features/ec2/client.feature +0 -16
- data/features/ec2/step_definitions.rb +0 -6
- data/features/elasticache/client.feature +0 -16
- data/features/elasticache/step_definitions.rb +0 -6
- data/features/elasticbeanstalk/client.feature +0 -16
- data/features/elasticbeanstalk/step_definitions.rb +0 -6
- data/features/elasticloadbalancing/client.feature +0 -16
- data/features/elasticloadbalancing/step_definitions.rb +0 -6
- data/features/elastictranscoder/client.feature +0 -16
- data/features/elastictranscoder/step_definitions.rb +0 -6
- data/features/emr/client.feature +0 -16
- data/features/emr/step_definitions.rb +0 -6
- data/features/env.rb +0 -23
- data/features/glacier/client.feature +0 -17
- data/features/glacier/step_definitions.rb +0 -93
- data/features/glacier/upload.feature +0 -27
- data/features/iam/client.feature +0 -16
- data/features/iam/step_definitions.rb +0 -6
- data/features/importexport/client.feature +0 -16
- data/features/importexport/step_definitions.rb +0 -6
- data/features/kinesis/client.feature +0 -16
- data/features/kinesis/step_definitions.rb +0 -6
- data/features/opsworks/client.feature +0 -16
- data/features/opsworks/step_definitions.rb +0 -6
- data/features/rds/client.feature +0 -16
- data/features/rds/step_definitions.rb +0 -6
- data/features/redshift/client.feature +0 -16
- data/features/redshift/step_definitions.rb +0 -6
- data/features/route53/client.feature +0 -16
- data/features/route53/step_definitions.rb +0 -6
- data/features/s3/buckets.feature +0 -40
- data/features/s3/objects.feature +0 -37
- data/features/s3/step_definitions.rb +0 -165
- data/features/s3/test.png +0 -0
- data/features/ses/client.feature +0 -16
- data/features/ses/step_definitions.rb +0 -6
- data/features/simpledb/client.feature +0 -16
- data/features/simpledb/step_definitions.rb +0 -6
- data/features/sns/client.feature +0 -17
- data/features/sns/step_definitions.rb +0 -6
- data/features/sqs/client.feature +0 -21
- data/features/sqs/step_definitions.rb +0 -29
- data/features/step_definitions.rb +0 -94
- data/features/storagegateway/client.feature +0 -16
- data/features/storagegateway/step_definitions.rb +0 -6
- data/features/sts/client.feature +0 -17
- data/features/sts/step_definitions.rb +0 -6
- data/features/swf/client.feature +0 -17
- data/features/swf/step_definitions.rb +0 -6
- data/integration-test-config.json.sample +0 -3
- data/lib/aws/api/manifest.rb +0 -29
- data/lib/aws/api/manifest_builder.rb +0 -57
- data/lib/aws/client.rb +0 -241
- data/lib/aws/endpoint_provider.rb +0 -165
- data/lib/aws/plugins/response_paging.rb +0 -20
- data/lib/aws/plugins/s3_sse_cpk.rb +0 -42
- data/lib/aws/response_handler.rb +0 -38
- data/lib/aws/service.rb +0 -32
- data/lib/aws/signers/v4.rb.orig +0 -243
- data/lib/aws/version.rb +0 -3
- data/lib/aws/version.rb.orig +0 -7
- data/lib/aws.rb +0 -208
- data/lib/aws.rb.orig +0 -218
- data/spec/aws/client_spec.rb +0 -269
- data/spec/aws/credential_provider_chain_spec.rb +0 -120
- data/spec/aws/credentials_spec.rb +0 -47
- data/spec/aws/errors_spec.rb +0 -39
- data/spec/aws/iam_spec.rb +0 -17
- data/spec/aws/instance_profile_credentials_spec.rb +0 -94
- data/spec/aws/json/builder_spec.rb +0 -188
- data/spec/aws/json/parser_spec.rb +0 -214
- data/spec/aws/operations_spec.rb +0 -145
- data/spec/aws/pageable_response_spec.rb +0 -171
- data/spec/aws/plugins/global_configuration_spec.rb +0 -58
- data/spec/aws/plugins/region_endpoint_spec.rb +0 -86
- data/spec/aws/plugins/request_signer_spec.rb +0 -88
- data/spec/aws/plugins/retry_errors_spec.rb +0 -266
- data/spec/aws/plugins/s3_md5s_spec.rb +0 -84
- data/spec/aws/plugins/sqs_queue_urls_spec.rb +0 -42
- data/spec/aws/query/param_builder_spec.rb +0 -362
- data/spec/aws/query/param_list_spec.rb +0 -80
- data/spec/aws/query/param_spec.rb +0 -64
- data/spec/aws/s3_spec.rb +0 -79
- data/spec/aws/shared_credentials_spec.rb +0 -68
- data/spec/aws/signers/v4_spec.rb +0 -141
- data/spec/aws/structure_spec.rb +0 -166
- data/spec/aws/util_spec.rb +0 -60
- data/spec/aws/xml/builder_spec.rb +0 -412
- data/spec/aws/xml/parser_spec.rb +0 -723
- data/spec/aws_spec.rb +0 -94
- data/spec/fixtures/api/swf.json +0 -100
- data/spec/fixtures/credentials/mock_shared_credentials +0 -14
- data/spec/fixtures/operations/cloudfront/list_distributions.yml +0 -199
- data/spec/fixtures/operations/cloudfront/max_items.yml +0 -11
- data/spec/fixtures/operations/dynamodb/error_parsing.yml +0 -13
- data/spec/fixtures/operations/glacier/account_id_param.yml +0 -13
- data/spec/fixtures/operations/glacier/custom_account_id.yml +0 -11
- data/spec/fixtures/operations/glacier/default_account_id.yml +0 -10
- data/spec/fixtures/operations/glacier/error_parsing.yml +0 -10
- data/spec/fixtures/operations/glacier/get_job_output.yml +0 -23
- data/spec/fixtures/operations/glacier/list_vaults.yml +0 -24
- data/spec/fixtures/operations/iam/result_wrapped_elements.yml +0 -31
- data/spec/fixtures/operations/route53/change_resource_record_sets.yml +0 -18
- data/spec/fixtures/operations/s3/304_response.yml +0 -12
- data/spec/fixtures/operations/s3/400_response.yml +0 -12
- data/spec/fixtures/operations/s3/403_response.yml +0 -12
- data/spec/fixtures/operations/s3/404_response.yml +0 -12
- data/spec/fixtures/operations/s3/412_response_head.yml +0 -10
- data/spec/fixtures/operations/s3/comlete_multipart_upload_error.yml +0 -18
- data/spec/fixtures/operations/s3/content_type_header.yml +0 -12
- data/spec/fixtures/operations/s3/create_bucket_with_implied_location_constraint.yml +0 -23
- data/spec/fixtures/operations/s3/create_bucket_with_location_constraint.yml +0 -25
- data/spec/fixtures/operations/s3/create_bucket_without_location_constraint.yml +0 -9
- data/spec/fixtures/operations/s3/delete_objects.yml +0 -54
- data/spec/fixtures/operations/s3/error_parsing.yml +0 -17
- data/spec/fixtures/operations/s3/get_bucket_location.yml +0 -17
- data/spec/fixtures/operations/s3/get_bucket_location_classic.yml +0 -17
- data/spec/fixtures/operations/s3/get_bucket_policy.yml +0 -8
- data/spec/fixtures/operations/s3/head_bucket_with_dns_incompatible_name.yml +0 -12
- data/spec/fixtures/operations/s3/head_object.yml +0 -50
- data/spec/fixtures/operations/s3/list_buckets.yml +0 -41
- data/spec/fixtures/operations/s3/md5_checksum_disabled.yml +0 -10
- data/spec/fixtures/operations/s3/md5_checksum_enabled.yml +0 -8
- data/spec/fixtures/operations/swf/list_domains.yml +0 -20
- data/spec/fixtures/protocols/input/ec2.json +0 -383
- data/spec/fixtures/protocols/input/json.json +0 -47
- data/spec/fixtures/protocols/input/query.json +0 -335
- data/spec/fixtures/protocols/input/rest-json.json +0 -365
- data/spec/fixtures/protocols/input/rest-xml.json +0 -818
- data/spec/fixtures/protocols/output/ec2.json +0 -381
- data/spec/fixtures/protocols/output/json.json +0 -313
- data/spec/fixtures/protocols/output/query.json +0 -424
- data/spec/fixtures/protocols/output/rest-json.json +0 -486
- data/spec/fixtures/protocols/output/rest-xml.json +0 -486
- data/spec/protocols_spec.rb +0 -186
- data/spec/spec_helper.rb +0 -66
- data/tasks/docs.rake +0 -61
- data/tasks/handlers.rake +0 -98
- data/tasks/manifest.rake +0 -9
- data/tasks/test.rake +0 -30
- data/vendor/seahorse/.gitignore +0 -5
- data/vendor/seahorse/.simplecov +0 -4
- data/vendor/seahorse/.yardopts +0 -10
- data/vendor/seahorse/Gemfile +0 -17
- data/vendor/seahorse/LICENSE.txt +0 -12
- data/vendor/seahorse/README.md +0 -129
- data/vendor/seahorse/Rakefile +0 -7
- data/vendor/seahorse/lib/seahorse/client/plugins/api.rb +0 -11
- data/vendor/seahorse/seahorse.gemspec +0 -20
- data/vendor/seahorse/spec/fixtures/plugin.rb +0 -4
- data/vendor/seahorse/spec/seahorse/client/base_spec.rb +0 -299
- data/vendor/seahorse/spec/seahorse/client/configuration_spec.rb +0 -122
- data/vendor/seahorse/spec/seahorse/client/handler_builder_spec.rb +0 -159
- data/vendor/seahorse/spec/seahorse/client/handler_list_spec.rb +0 -232
- data/vendor/seahorse/spec/seahorse/client/handler_spec.rb +0 -40
- data/vendor/seahorse/spec/seahorse/client/http/headers_spec.rb +0 -213
- data/vendor/seahorse/spec/seahorse/client/http/request_spec.rb +0 -121
- data/vendor/seahorse/spec/seahorse/client/http/response_spec.rb +0 -77
- data/vendor/seahorse/spec/seahorse/client/logging/formatter_spec.rb +0 -185
- data/vendor/seahorse/spec/seahorse/client/logging/handler_spec.rb +0 -63
- data/vendor/seahorse/spec/seahorse/client/net_http/connection_pool_spec.rb +0 -10
- data/vendor/seahorse/spec/seahorse/client/net_http/handler_spec.rb +0 -242
- data/vendor/seahorse/spec/seahorse/client/param_converter_spec.rb +0 -308
- data/vendor/seahorse/spec/seahorse/client/param_validator_spec.rb +0 -275
- data/vendor/seahorse/spec/seahorse/client/plugin_list_spec.rb +0 -166
- data/vendor/seahorse/spec/seahorse/client/plugin_spec.rb +0 -118
- data/vendor/seahorse/spec/seahorse/client/plugins/content_length_spec.rb +0 -19
- data/vendor/seahorse/spec/seahorse/client/plugins/endpoint_spec.rb +0 -33
- data/vendor/seahorse/spec/seahorse/client/plugins/logging_spec.rb +0 -46
- data/vendor/seahorse/spec/seahorse/client/plugins/net_http_spec.rb +0 -70
- data/vendor/seahorse/spec/seahorse/client/plugins/operation_methods_spec.rb +0 -76
- data/vendor/seahorse/spec/seahorse/client/request_context_spec.rb +0 -105
- data/vendor/seahorse/spec/seahorse/client/request_spec.rb +0 -152
- data/vendor/seahorse/spec/seahorse/client/response_spec.rb +0 -95
- data/vendor/seahorse/spec/seahorse/client/xml/builder/xml_doc_spec.rb +0 -142
- data/vendor/seahorse/spec/seahorse/client/xml/builder_spec.rb +0 -10
- data/vendor/seahorse/spec/seahorse/model/api_spec.rb +0 -154
- data/vendor/seahorse/spec/seahorse/model/operation_spec.rb +0 -162
- data/vendor/seahorse/spec/seahorse/model/shape_map_spec.rb +0 -84
- data/vendor/seahorse/spec/seahorse/model/shapes_spec.rb +0 -522
- data/vendor/seahorse/spec/seahorse/util_spec.rb +0 -54
- data/vendor/seahorse/spec/seahorse/version_spec.rb +0 -11
- data/vendor/seahorse/spec/spec_helper.rb +0 -34
- data/vendor/seahorse/tasks/docs.rake +0 -11
- data/vendor/seahorse/tasks/test.rake +0 -15
- /data/apis/{autoscaling-2011-01-01.paginators.json → AutoScaling.paginators.json} +0 -0
- /data/apis/{cloudformation-2010-05-15.paginators.json → CloudFormation.paginators.json} +0 -0
- /data/apis/{cloudfront-2014-01-31.waiters.json → CloudFront.waiters.json} +0 -0
- /data/apis/{cloudsearch-2013-01-01.paginators.json → CloudSearch.paginators.json} +0 -0
- /data/apis/{cloudtrail-2013-11-01.paginators.json → CloudTrail.paginators.json} +0 -0
- /data/apis/{monitoring-2010-08-01.paginators.json → CloudWatch.paginators.json} +0 -0
- /data/apis/{logs-2014-03-28.paginators.json → CloudWatchLogs.paginators.json} +0 -0
- /data/apis/{datapipeline-2012-10-29.paginators.json → DataPipeline.paginators.json} +0 -0
- /data/apis/{directconnect-2012-10-25.paginators.json → DirectConnect.paginators.json} +0 -0
- /data/apis/{dynamodb-2012-08-10.waiters.json → DynamoDB.waiters.json} +0 -0
- /data/apis/{ec2-2014-06-15.paginators.json → EC2.paginators.json} +0 -0
- /data/apis/{ec2-2014-06-15.waiters.json → EC2.waiters.json} +0 -0
- /data/apis/{elasticmapreduce-2009-03-31.paginators.json → EMR.paginators.json} +0 -0
- /data/apis/{elasticache-2014-03-24.paginators.json → ElastiCache.paginators.json} +0 -0
- /data/apis/{elasticbeanstalk-2010-12-01.paginators.json → ElasticBeanstalk.paginators.json} +0 -0
- /data/apis/{elasticloadbalancing-2012-06-01.paginators.json → ElasticLoadBalancing.paginators.json} +0 -0
- /data/apis/{elastictranscoder-2012-09-25.paginators.json → ElasticTranscoder.paginators.json} +0 -0
- /data/apis/{glacier-2012-06-01.paginators.json → Glacier.paginators.json} +0 -0
- /data/apis/{glacier-2012-06-01.waiters.json → Glacier.waiters.json} +0 -0
- /data/apis/{iam-2010-05-08.paginators.json → IAM.paginators.json} +0 -0
- /data/apis/{importexport-2010-06-01.paginators.json → ImportExport.paginators.json} +0 -0
- /data/apis/{opsworks-2013-02-18.paginators.json → OpsWorks.paginators.json} +0 -0
- /data/apis/{rds-2013-01-10.paginators.json → RDS.paginators.json} +0 -0
- /data/apis/{rds-2013-09-09.waiters.json → RDS.waiters.json} +0 -0
- /data/apis/{redshift-2012-12-01.paginators.json → Redshift.paginators.json} +0 -0
- /data/apis/{redshift-2012-12-01.waiters.json → Redshift.waiters.json} +0 -0
- /data/apis/{route53-2013-04-01.paginators.json → Route53.paginators.json} +0 -0
- /data/apis/{s3-2006-03-01.waiters.json → S3.waiters.json} +0 -0
- /data/apis/{email-2010-12-01.paginators.json → SES.paginators.json} +0 -0
- /data/apis/{email-2010-12-01.waiters.json → SES.waiters.json} +0 -0
- /data/apis/{sns-2010-03-31.paginators.json → SNS.paginators.json} +0 -0
- /data/apis/{sns-2010-03-31.resources.json → SNS.resources.json} +0 -0
- /data/apis/{sqs-2012-11-05.paginators.json → SQS.paginators.json} +0 -0
- /data/apis/{swf-2012-01-25.paginators.json → SWF.paginators.json} +0 -0
- /data/apis/{sdb-2009-04-15.paginators.json → SimpleDB.paginators.json} +0 -0
- /data/apis/{storagegateway-2013-06-30.paginators.json → StorageGateway.paginators.json} +0 -0
- /data/apis/{support-2013-04-15.paginators.json → Support.paginators.json} +0 -0
- /data/lib/{aws → aws-sdk-core}/api/customizer.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/credentials.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/error_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/parser.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rest_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rpc_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/rpc_headers_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/json/simple_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/null_pager.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/null_provider.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/pager.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/paging/provider.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/dynamodb_extended_retries.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/ec2_copy_encrypted_snapshot.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_account_id.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_api_version.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/glacier_checksums.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/ec2.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/query.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/rest_json.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/protocols/rest_xml.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_bucket_dns.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_complete_multipart_upload_fix.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_get_bucket_location_fix.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_location_constraint.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_md5s.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/s3_redirects.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/sqs_queue_urls.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/plugins/swf_read_timeouts.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/ec2_param_builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param_builder.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/query/param_list.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/rest_body_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/shared_credentials.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/base.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/s3.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/v2.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/signers/v3.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/tree_hash.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/xml/error_handler.rb +0 -0
- /data/lib/{aws → aws-sdk-core}/xml/rest_handler.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/block_io.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/configuration.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/handler.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/handler_builder.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/handler_list_entry.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/http/headers.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/http/response.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/logging/formatter.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/logging/handler.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/managed_file.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/param_validator.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugin.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugin_list.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/content_length.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/json_simple.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/logging.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/net_http.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/operation_methods.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/param_conversion.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/param_validation.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/plugins/raise_response_errors.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/client/request_context.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/model/api.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/model/operation.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/util.rb +0 -0
- /data/{vendor/seahorse/lib → lib}/seahorse/version.rb +0 -0
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
def eventually(options = {}, &block)
|
|
2
|
-
seconds = options[:upto] || 15
|
|
3
|
-
delays = [1]
|
|
4
|
-
while delays.inject(0) { |sum, i| sum + i } < seconds
|
|
5
|
-
delays << delays.last * 1.2
|
|
6
|
-
end
|
|
7
|
-
begin
|
|
8
|
-
yield
|
|
9
|
-
rescue StandardError, RSpec::Expectations::ExpectationNotMetError => error
|
|
10
|
-
unless delays.empty?
|
|
11
|
-
sleep(delays.shift)
|
|
12
|
-
retry
|
|
13
|
-
end
|
|
14
|
-
raise error # terminal case
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def underscore(str)
|
|
19
|
-
Seahorse::Util.underscore(str)
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def symbolized_params(table)
|
|
23
|
-
table.rows_hash.each_with_object({}) do |(key,value), hash|
|
|
24
|
-
hash[underscore(key).to_sym] = param_value(value)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def raw_params(table)
|
|
29
|
-
table.rows_hash.each_with_object({}) do |(key,value), hash|
|
|
30
|
-
hash[key] = param_value(value)
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def param_value(value)
|
|
35
|
-
case value
|
|
36
|
-
when /^\d+$/ then value.to_i
|
|
37
|
-
when /^\[(.*)\]$/ then $1.split(',').map { |str| str[1..-2] }
|
|
38
|
-
else value
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
When(/^I call the "(.*?)" API$/) do |api|
|
|
43
|
-
@response = @client.send(underscore(api))
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
When(/^I call the "(.*?)" API with:$/) do |api, params|
|
|
47
|
-
params = @simple_json ? raw_params(params) : symbolized_params(params)
|
|
48
|
-
@response = @client.send(underscore(api), params)
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
When(/^I attempt to call the "(.*?)" API with:$/) do |api, params|
|
|
52
|
-
params = @simple_json ? raw_params(params) : symbolized_params(params)
|
|
53
|
-
begin
|
|
54
|
-
@response = @client.send(underscore(api), params)
|
|
55
|
-
rescue => @error
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
Then(/^the response should contain a (list of )?"(\w+?)"$/) do |_,member_name|
|
|
60
|
-
data = @response.data
|
|
61
|
-
data = data[underscore(member_name)]
|
|
62
|
-
expect(data).to be_an(Array)
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
Then(/^the response should contain a "(\w+?)" with a list of "(\w+?)"$/) do |member1, member2|
|
|
66
|
-
data = @response.data
|
|
67
|
-
data = data[underscore(member1)]
|
|
68
|
-
data = data[underscore(member2)]
|
|
69
|
-
expect(data).to be_an(Array)
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
Then(/^I expect the response error code to be "(.*?)"$/) do |error_code|
|
|
73
|
-
expect(@error.class.name.split('::').last).to eq(error_code)
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
Then(/^I expect the response error message to include:$/) do |error_message|
|
|
77
|
-
expect(@error.message).to include(error_message)
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
Then(/^the HTTP request body should be:$/) do |string|
|
|
81
|
-
expect(@response.context.http_request.body_contents).to eq(string)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
Then(/^I expect response data to be a hash$/) do
|
|
85
|
-
expect(@response.data).to be_a(Hash)
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
Then(/^I expect response data\["(.*?)"\] to be an array$/) do |key|
|
|
89
|
-
expect(@response.data[key]).to be_an(Array)
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
Then(/^the response should contain a "(.*?)" member$/) do |member_name|
|
|
93
|
-
expect(@response.data[underscore(member_name)]).not_to be_nil
|
|
94
|
-
end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# language: en
|
|
2
|
-
@storagegateway @client
|
|
3
|
-
Feature: AWS Storage Gateway
|
|
4
|
-
|
|
5
|
-
Scenario: Making a basic request
|
|
6
|
-
When I call the "ListGateways" API
|
|
7
|
-
Then the response should contain a list of "Gateways"
|
|
8
|
-
|
|
9
|
-
Scenario: Error handling
|
|
10
|
-
When I attempt to call the "ListVolumes" API with:
|
|
11
|
-
| GatewayARN | fake_gateway |
|
|
12
|
-
Then I expect the response error code to be "ValidationException"
|
|
13
|
-
And I expect the response error message to include:
|
|
14
|
-
"""
|
|
15
|
-
Value 'fake_gateway' at 'gatewayARN' failed to satisfy constraint
|
|
16
|
-
"""
|
data/features/sts/client.feature
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# language: en
|
|
2
|
-
@sts @client
|
|
3
|
-
Feature: AWS STS
|
|
4
|
-
|
|
5
|
-
Scenario: Making a basic request
|
|
6
|
-
When I call the "GetSessionToken" API
|
|
7
|
-
Then the response should contain a "Credentials" member
|
|
8
|
-
|
|
9
|
-
Scenario: Error handling
|
|
10
|
-
When I attempt to call the "GetFederationToken" API with:
|
|
11
|
-
| Name | temp |
|
|
12
|
-
| Policy | |
|
|
13
|
-
Then I expect the response error code to be "ValidationError"
|
|
14
|
-
And I expect the response error message to include:
|
|
15
|
-
"""
|
|
16
|
-
Value '' at 'policy' failed to satisfy constraint
|
|
17
|
-
"""
|
data/features/swf/client.feature
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# language: en
|
|
2
|
-
@swf @client
|
|
3
|
-
Feature: Amazon Simple Workflow Service
|
|
4
|
-
|
|
5
|
-
Scenario: Making a basic request
|
|
6
|
-
When I call the "ListDomains" API with:
|
|
7
|
-
| RegistrationStatus | REGISTERED |
|
|
8
|
-
Then the response should contain a list of "DomainInfos"
|
|
9
|
-
|
|
10
|
-
Scenario: Error handling
|
|
11
|
-
When I attempt to call the "DescribeDomain" API with:
|
|
12
|
-
| Name | fake_domain |
|
|
13
|
-
Then I expect the response error code to be "UnknownResourceFault"
|
|
14
|
-
And I expect the response error message to include:
|
|
15
|
-
"""
|
|
16
|
-
Unknown domain: fake_domain
|
|
17
|
-
"""
|
data/lib/aws/api/manifest.rb
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
require 'multi_json'
|
|
2
|
-
|
|
3
|
-
module Aws
|
|
4
|
-
module Api
|
|
5
|
-
# @api private
|
|
6
|
-
class Manifest
|
|
7
|
-
|
|
8
|
-
# @api private
|
|
9
|
-
DEFAULT_MANIFEST_PATH = File.join(GEM_ROOT, 'apis', 'manifest.json')
|
|
10
|
-
|
|
11
|
-
# @param [Hash] manifest
|
|
12
|
-
def initialize(manifest)
|
|
13
|
-
@services = manifest.map do |name,verisons|
|
|
14
|
-
Entry.new(name, name.downcase.to_sym, verisons)
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
# @return [Array<Service>]
|
|
19
|
-
attr_reader :services
|
|
20
|
-
|
|
21
|
-
def self.default_manifest
|
|
22
|
-
new(MultiJson.load(File.read(DEFAULT_MANIFEST_PATH)))
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
Entry = Struct.new(:name, :identifier, :versions)
|
|
26
|
-
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
require 'multi_json'
|
|
2
|
-
|
|
3
|
-
module Aws
|
|
4
|
-
module Api
|
|
5
|
-
# @api private
|
|
6
|
-
class ManifestBuilder
|
|
7
|
-
|
|
8
|
-
# @param [String] directory The folder to scan for API files.
|
|
9
|
-
def initialize(directory)
|
|
10
|
-
@directory = directory
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def build
|
|
14
|
-
manifest = {}
|
|
15
|
-
Dir.glob(File.join(@directory, '*.api.json')).each do |path|
|
|
16
|
-
api = JSON.load(File.read(path))
|
|
17
|
-
service = compute_service_name(api)
|
|
18
|
-
version = api['metadata']['apiVersion']
|
|
19
|
-
manifest[service] ||= {}
|
|
20
|
-
manifest[service][version] = entry(path, api)
|
|
21
|
-
end
|
|
22
|
-
manifest
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
private
|
|
26
|
-
|
|
27
|
-
def compute_service_name(api)
|
|
28
|
-
metadata = api['metadata']
|
|
29
|
-
name = metadata['serviceAbbreviation'] || metadata['serviceFullName']
|
|
30
|
-
name = name.sub('Amazon', '').sub('AWS', '').gsub(/\W+/, '')
|
|
31
|
-
name
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def compatible_with(api)
|
|
35
|
-
api['metadata']['compatibleWith']
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
def path_for(file_type, api)
|
|
39
|
-
prefix = api['metadata']['endpointPrefix']
|
|
40
|
-
version = api['metadata']['apiVersion']
|
|
41
|
-
path = File.join(@directory, "#{prefix}-#{version}.#{file_type}.json")
|
|
42
|
-
path if File.exists?(path)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def entry(path, api)
|
|
46
|
-
entry = {
|
|
47
|
-
'api' => path,
|
|
48
|
-
'paginators' => path_for('paginators', api),
|
|
49
|
-
'waiters' => path_for('waiters', api),
|
|
50
|
-
'resources' => path_for('resources', api),
|
|
51
|
-
'compatibleWith' => compatible_with(api),
|
|
52
|
-
}.delete_if { |k,v| v.nil? }
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
data/lib/aws/client.rb
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
require 'multi_json'
|
|
2
|
-
|
|
3
|
-
module Aws
|
|
4
|
-
class Client
|
|
5
|
-
class << self
|
|
6
|
-
|
|
7
|
-
# Constructs and returns versioned API client. Defaults to the
|
|
8
|
-
# newest/latest API version.
|
|
9
|
-
#
|
|
10
|
-
# Aws::DynamoDB.new
|
|
11
|
-
# #=> #<Aws::DynamoDB::V20120810>
|
|
12
|
-
#
|
|
13
|
-
# ## Specify API Version
|
|
14
|
-
#
|
|
15
|
-
# You can specify the API version and get a different client.
|
|
16
|
-
#
|
|
17
|
-
# Aws::DynamoDB.new(api_version: '2011-12-05')
|
|
18
|
-
# #=> #<Aws::DynamoDB::V20111205>
|
|
19
|
-
#
|
|
20
|
-
# ## Locking API Versions
|
|
21
|
-
#
|
|
22
|
-
# You can lock the API version for a service via {Aws.config}:
|
|
23
|
-
#
|
|
24
|
-
# Aws.config[:dynamodb] = { api_version: '2011-12-05' }
|
|
25
|
-
# Aws::DynamoDB.new
|
|
26
|
-
# #=> #<Aws::DynamoDB::V20111205>
|
|
27
|
-
#
|
|
28
|
-
# ## Global Version Lock
|
|
29
|
-
#
|
|
30
|
-
# It is possible to provide a single 'YYYY-MM-DD' date to lock the
|
|
31
|
-
# API version for every service. This is useful to ensure that
|
|
32
|
-
# future API updates do not break existing usage.
|
|
33
|
-
#
|
|
34
|
-
# When using the single lock, the API version that was current
|
|
35
|
-
# at the given date will be used.
|
|
36
|
-
#
|
|
37
|
-
# For example, Aws::DynamoDB has two API versions, 2011-12-05 and
|
|
38
|
-
# 2012-10-01. If the lock date is in between these two dates, the
|
|
39
|
-
# older will be used.
|
|
40
|
-
#
|
|
41
|
-
# Aws.config[:api_version] = '2012-01-01'
|
|
42
|
-
# Aws::DynamoDB.new
|
|
43
|
-
# #=> #<Aws::DynamoDB::V20111205>
|
|
44
|
-
#
|
|
45
|
-
# @return [Seahorse::Client::Base] Returns a versioned client.
|
|
46
|
-
def new(options = {})
|
|
47
|
-
options = options.dup
|
|
48
|
-
api_version = options.delete(:api_version) || default_api_version
|
|
49
|
-
versioned_client_class(api_version).new(options)
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# Registers a new API version for this client factory. You need to
|
|
53
|
-
# provide the API version in `YYYY-MM-DD` format and an API.
|
|
54
|
-
#
|
|
55
|
-
# Aws::S3.add_version('2013-01-02', 'api' => '/path/to/api.json')
|
|
56
|
-
#
|
|
57
|
-
# You can also provide paths to the paginator, waiter, and resource
|
|
58
|
-
# definitions.
|
|
59
|
-
#
|
|
60
|
-
# @param [String<YYYY-MM-DD>] api_version
|
|
61
|
-
# @param [Hash] definitions
|
|
62
|
-
# @option definitions [required,String] 'api'
|
|
63
|
-
# @option definitions [String] 'paginators'
|
|
64
|
-
# @option definitions [String] 'waiters'
|
|
65
|
-
# @option definitions [String] 'resources'
|
|
66
|
-
# @return [void]
|
|
67
|
-
# @see .api_versions
|
|
68
|
-
# @see .default_api_version
|
|
69
|
-
# @see .latest_api_version
|
|
70
|
-
# @see .versioned_clients
|
|
71
|
-
def add_version(api_version, definitions)
|
|
72
|
-
versions[api_version] = definitions
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
# @return [Array<String>] Returns a list of supported API versions
|
|
76
|
-
# in a `YYYY-MM-DD` format.
|
|
77
|
-
# @see .add_version
|
|
78
|
-
# @see .latest_api_version
|
|
79
|
-
# @see .default_api_version
|
|
80
|
-
# @see .default_client_class
|
|
81
|
-
# @see .versioned_clients
|
|
82
|
-
def api_versions
|
|
83
|
-
versions.keys.sort
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
# @return [String<YYYY-MM-DD>] Returns the most current API version.
|
|
87
|
-
# @see .add_version
|
|
88
|
-
# @see .api_versions
|
|
89
|
-
# @see .default_api_version
|
|
90
|
-
# @see .default_client_class
|
|
91
|
-
# @see .versioned_clients
|
|
92
|
-
def latest_api_version
|
|
93
|
-
api_versions.last
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# @return [String<YYYY-MM-DD>] Returns the default API version. This
|
|
97
|
-
# is the version of the client that will be constructed if there
|
|
98
|
-
# is other configured or specified API version.
|
|
99
|
-
# @see .add_version
|
|
100
|
-
# @see .api_versions
|
|
101
|
-
# @see .default_client_class
|
|
102
|
-
# @see .latest_api_version
|
|
103
|
-
# @see .versioned_clients
|
|
104
|
-
def default_api_version
|
|
105
|
-
svc_locked_version || aws_locked_version || latest_api_version
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
# Returns an array of versioned client classes for this service.
|
|
109
|
-
#
|
|
110
|
-
# Aws::DynamoDB.versioned_clients
|
|
111
|
-
# #=> [Aws::DynamoDB::V20111205, Aws::DynamoDB::V20120810]
|
|
112
|
-
#
|
|
113
|
-
# @return [Array<Class>] Returns an array of the versioned client
|
|
114
|
-
# classes for this service.
|
|
115
|
-
# @see .add_version
|
|
116
|
-
# @see .api_versions
|
|
117
|
-
# @see .default_api_version
|
|
118
|
-
# @see .default_client_class
|
|
119
|
-
# @see .latest_api_version
|
|
120
|
-
def versioned_clients
|
|
121
|
-
api_versions.map { |api_version| versioned_client_class(api_version) }
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
# @return [Class<Seahorse::Client::Base>]
|
|
125
|
-
# @see .add_version
|
|
126
|
-
# @see .api_versions
|
|
127
|
-
# @see .default_api_version
|
|
128
|
-
# @see .latest_api_version
|
|
129
|
-
# @see .versioned_clients
|
|
130
|
-
def default_client_class
|
|
131
|
-
versioned_client_class(default_api_version)
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
# Adds a plugin to each versioned client class.
|
|
135
|
-
# @param [Plugin] plugin
|
|
136
|
-
# @return [void]
|
|
137
|
-
# @see .remove_plugin
|
|
138
|
-
def add_plugin(plugin)
|
|
139
|
-
versioned_clients.each do |client_class|
|
|
140
|
-
client_class.add_plugin(plugin)
|
|
141
|
-
end
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
# Removes a plugin from each versioned client class.
|
|
145
|
-
# @param [Plugin] plugin
|
|
146
|
-
# @return [void]
|
|
147
|
-
# @see .add_plugin
|
|
148
|
-
def remove_plugin(plugin)
|
|
149
|
-
versioned_clients.each do |client_class|
|
|
150
|
-
client_class.remove_plugin(plugin)
|
|
151
|
-
end
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
# @api private
|
|
155
|
-
def define(identifier, versions = {})
|
|
156
|
-
Class.new(self).tap do |client_class|
|
|
157
|
-
client_class.const_set(:IDENTIFIER, identifier)
|
|
158
|
-
versions.each do |date, definitions|
|
|
159
|
-
client_class.add_version(date, definitions)
|
|
160
|
-
end
|
|
161
|
-
end
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
# @api private
|
|
165
|
-
def const_missing(const)
|
|
166
|
-
if const =~ /^V\d{8}$/
|
|
167
|
-
const_set(const, build_versioned_client_class(api_version(const)))
|
|
168
|
-
else
|
|
169
|
-
super
|
|
170
|
-
end
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
private
|
|
174
|
-
|
|
175
|
-
def build_versioned_client_class(version)
|
|
176
|
-
if definitions = versions[version]
|
|
177
|
-
api = build_api(definitions['api'])
|
|
178
|
-
apply_paging(api, definitions['paginators'])
|
|
179
|
-
client_class = Seahorse::Client::Base.define(api: api)
|
|
180
|
-
client_class.const_set(:IDENTIFIER, self::IDENTIFIER)
|
|
181
|
-
Api::ServiceCustomizations.apply(client_class)
|
|
182
|
-
client_class
|
|
183
|
-
else
|
|
184
|
-
msg = "API #{version} not defined for #{name}"
|
|
185
|
-
raise Errors::NoSuchApiVersionError, msg
|
|
186
|
-
end
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
def apply_paging(api, paging)
|
|
190
|
-
paging = case paging
|
|
191
|
-
when nil then Paging::NullProvider.new
|
|
192
|
-
when Paging::Provider then paging
|
|
193
|
-
when Hash then PagingProvider.new(paging)
|
|
194
|
-
when String
|
|
195
|
-
path = File.expand_path(paging, GEM_ROOT)
|
|
196
|
-
Paging::Provider.new(MultiJson.load(File.read(path)))
|
|
197
|
-
else raise "unhandled paging format `#{paging}'"
|
|
198
|
-
end
|
|
199
|
-
api.definition['metadata']['paging'] = paging
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
def svc_locked_version
|
|
203
|
-
(Aws.config[self::IDENTIFIER] || {})[:api_version]
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
def aws_locked_version
|
|
207
|
-
if api_version = Aws.config[:api_version]
|
|
208
|
-
api_versions.select { |v| v <= api_version }.last || api_version
|
|
209
|
-
end
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
def versioned_client_class(api_version)
|
|
213
|
-
const_get("V#{api_version.gsub('-', '')}")
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
def versions
|
|
217
|
-
@versions ||= {}
|
|
218
|
-
end
|
|
219
|
-
|
|
220
|
-
def build_api(api)
|
|
221
|
-
case api
|
|
222
|
-
when String then load_api(api)
|
|
223
|
-
when Hash then Seahorse::Model::Api.new(api)
|
|
224
|
-
when Seahorse::Model::Api then api
|
|
225
|
-
else raise "unhandled api format `#{api.class.name}'"
|
|
226
|
-
end
|
|
227
|
-
end
|
|
228
|
-
|
|
229
|
-
def api_version(constant)
|
|
230
|
-
constant.to_s.match(/V(\d{4})(\d{2})(\d{2})/)[1..3].join('-')
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
def load_api(path)
|
|
234
|
-
path = File.expand_path(path, GEM_ROOT)
|
|
235
|
-
api = MultiJson.load(File.read(path), max_nesting: false)
|
|
236
|
-
Seahorse::Model::Api.new(api)
|
|
237
|
-
end
|
|
238
|
-
|
|
239
|
-
end
|
|
240
|
-
end
|
|
241
|
-
end
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
require 'multi_json'
|
|
2
|
-
|
|
3
|
-
module Aws
|
|
4
|
-
class EndpointProvider
|
|
5
|
-
|
|
6
|
-
# @api private
|
|
7
|
-
DEFAULT_RULES_PATH = File.expand_path(File.join(File.dirname(__FILE__),
|
|
8
|
-
'..', '..', 'apis', 'endpoints.json'
|
|
9
|
-
))
|
|
10
|
-
|
|
11
|
-
def initialize
|
|
12
|
-
clear_rules
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
# @option options [required, String] :service
|
|
16
|
-
# @option options [required, String] :region
|
|
17
|
-
# @option options [required, String] :scheme
|
|
18
|
-
def resolve(options = {})
|
|
19
|
-
service_rules(options[:service].to_s).each do |rule|
|
|
20
|
-
return rule.apply(options) if rule.matches?(options)
|
|
21
|
-
end
|
|
22
|
-
nil
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
# Removes all rules.
|
|
26
|
-
def clear_rules
|
|
27
|
-
@rules = Hash.new{ |h,k| h[k] = [] }
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Prepends a default rule that applies to all services. Default
|
|
31
|
-
# rules have lower priority than service specific rules.
|
|
32
|
-
def prepend_default_rule(rule)
|
|
33
|
-
prepend_service_rule('_default', rule)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# Appends a rule that applies for all services. Appending a rule
|
|
37
|
-
# gives it lowest priority. Default rules have lower priority than
|
|
38
|
-
# service specific rules.
|
|
39
|
-
def append_default_rule(rule)
|
|
40
|
-
append_service_rule('_default', rule)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# Prepends a rule that applies to a single service. Prepending a rule
|
|
44
|
-
# gives it higest priority. Service specific rules are matches before
|
|
45
|
-
# default rules.
|
|
46
|
-
# @param [String] service The endpoint prefix of the service.
|
|
47
|
-
# @param [Rule] rule
|
|
48
|
-
# @return [void]
|
|
49
|
-
def prepend_service_rule(service, rule)
|
|
50
|
-
@rules[service].unshift(rule)
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# Appends a rule that applies to a single service. Appending a rule
|
|
54
|
-
# gives it lowest priority. Service specific rules are matches before
|
|
55
|
-
# default rules.
|
|
56
|
-
# service specific rules.
|
|
57
|
-
# @param [String] service The endpoint prefix of the service.
|
|
58
|
-
# @param [Rule] rule
|
|
59
|
-
# @return [void]
|
|
60
|
-
def append_service_rule(service, rule)
|
|
61
|
-
@rules[service].push(rule)
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
# Appends the given rule to each service and as a default rule, giving
|
|
65
|
-
# it the highest priority.
|
|
66
|
-
# @param [Rule] rule
|
|
67
|
-
# @return [void]
|
|
68
|
-
def prepend_all(rule)
|
|
69
|
-
@rules.keys.each do |svc|
|
|
70
|
-
prepend_service_rule(svc, rule)
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
private
|
|
75
|
-
|
|
76
|
-
def service_rules(service_name)
|
|
77
|
-
rules_for(service_name) + rules_for('_default')
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
def rules_for(service_name)
|
|
81
|
-
@rules.key?(service_name) ? @rules[service_name] : []
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
class Rule
|
|
85
|
-
|
|
86
|
-
# @param [String] uri
|
|
87
|
-
# @param [Array<Array<String>>] constraints Each constraint must specify
|
|
88
|
-
# the following:
|
|
89
|
-
#
|
|
90
|
-
# * an option ("service", "region", "scheme")
|
|
91
|
-
# * a constraint ("startsWith", "equals", "notEquals", "oneOf")
|
|
92
|
-
# * a value or array of values for "oneOf"
|
|
93
|
-
#
|
|
94
|
-
# Example constraints:
|
|
95
|
-
#
|
|
96
|
-
# ['region', 'equals', 'cn-north-1']
|
|
97
|
-
# ['region', 'notEquals', 'us-east-1']
|
|
98
|
-
# ['region', 'oneOf', ['us-east-1', 'us-west-1']]
|
|
99
|
-
#
|
|
100
|
-
def initialize(uri, constraints = [])
|
|
101
|
-
@uri = uri
|
|
102
|
-
@constraints = constraints
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
def matches?(options)
|
|
106
|
-
@constraints.all? do |option, constraint_name, constraint|
|
|
107
|
-
send("option_#{constraint_name}", options[option.to_sym], constraint)
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
def apply(options)
|
|
112
|
-
@uri.gsub(/{(scheme|service|region)}/) do |placeholder|
|
|
113
|
-
options[placeholder[1..-2].to_sym]
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
private
|
|
118
|
-
|
|
119
|
-
def option_startsWith(option, constraint)
|
|
120
|
-
option.to_s.match(/^#{constraint}/)
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
def option_notStartsWith(option, constraint)
|
|
124
|
-
!option_startsWith(option, constraint)
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
def option_equals(option, constraint)
|
|
128
|
-
option == constraint
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
def option_notEquals(option, constraint)
|
|
132
|
-
!option_equals(option, constraint)
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
def option_oneOf(option, constraint)
|
|
136
|
-
constraint.include?(option)
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
class << self
|
|
142
|
-
|
|
143
|
-
# @return [EndpointProvider]
|
|
144
|
-
def default_provider
|
|
145
|
-
@default_provider ||= begin
|
|
146
|
-
new.tap do |provider|
|
|
147
|
-
default_rules do |service, rule|
|
|
148
|
-
provider.append_service_rule(service, rule)
|
|
149
|
-
end
|
|
150
|
-
end
|
|
151
|
-
end
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
# @api private
|
|
155
|
-
def default_rules(&block)
|
|
156
|
-
MultiJson.load(File.read(DEFAULT_RULES_PATH)).each do |service, rules|
|
|
157
|
-
rules.each do |rule|
|
|
158
|
-
yield(service, Rule.new(rule['uri'], rule['constraints'] || []))
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
module Aws
|
|
2
|
-
module Plugins
|
|
3
|
-
class ResponsePaging < Seahorse::Client::Plugin
|
|
4
|
-
|
|
5
|
-
# @api private
|
|
6
|
-
class Handler < Seahorse::Client::Handler
|
|
7
|
-
|
|
8
|
-
def call(context)
|
|
9
|
-
paging_provider = context.config.api.metadata('paging')
|
|
10
|
-
pager = paging_provider.pager(context.operation.name)
|
|
11
|
-
PageableResponse.new(@handler.call(context), pager)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
handler(Handler)
|
|
17
|
-
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|