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
data/bin/aws.rb
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
root = File.dirname(File.dirname(__FILE__))
|
|
4
4
|
$:.unshift(File.join(root, 'lib'))
|
|
5
|
-
$:.unshift(File.join(root, 'vendor', 'seahorse', 'lib'))
|
|
6
5
|
|
|
7
6
|
require 'rubygems'
|
|
8
7
|
require 'optparse'
|
|
@@ -95,6 +94,25 @@ end
|
|
|
95
94
|
|
|
96
95
|
require 'aws-sdk-core'
|
|
97
96
|
|
|
97
|
+
module Aws
|
|
98
|
+
class << self
|
|
99
|
+
SERVICE_MODULE_NAMES.each do |svc_name|
|
|
100
|
+
define_method(svc_name.downcase) do |options={}|
|
|
101
|
+
const_get(svc_name).const_get(:Client).new(options)
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
begin
|
|
108
|
+
# attempt to load aws-sdk-resources, checking first for source from
|
|
109
|
+
# a relative path in the repo, otherwise will check for the installed gem
|
|
110
|
+
lib = File.join(File.dirname(__FILE__), '..', '..', 'aws-sdk-resources', 'lib')
|
|
111
|
+
$LOAD_PATH.unshift(lib) if File.directory?(lib)
|
|
112
|
+
require 'aws-sdk-resources'
|
|
113
|
+
rescue LoadError
|
|
114
|
+
end
|
|
115
|
+
|
|
98
116
|
# configure the aws-sdk gem
|
|
99
117
|
|
|
100
118
|
cfg = {}
|
data/endpoints.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"priority": 500,
|
|
4
|
+
"regionPrefix": "cn-",
|
|
5
|
+
"rules": [
|
|
6
|
+
{
|
|
7
|
+
"services": ["iam", "sts"],
|
|
8
|
+
"config": {
|
|
9
|
+
"endpoint": "{scheme}://{service}.cn-north-1.amazonaws.com.cn"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"config": {
|
|
14
|
+
"endpoint": "{scheme}://{service}.{region}.amazonaws.com.cn"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"priority": 600,
|
|
21
|
+
"regionPrefix": "us-gov-",
|
|
22
|
+
"rules": [
|
|
23
|
+
{
|
|
24
|
+
"services": ["iam"],
|
|
25
|
+
"config": {
|
|
26
|
+
"endpoint": "{scheme}://{service}.us-gov.amazonaws.com"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"services": ["s3"],
|
|
31
|
+
"config": {
|
|
32
|
+
"endpoint": "{scheme}://{service}-{region}.amazonaws.com"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"config": {
|
|
37
|
+
"endpoint": "{scheme}://{service}.{region}.amazonaws.com"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"priority": 900,
|
|
44
|
+
"regionPrefix": "us-east-1",
|
|
45
|
+
"rules": [
|
|
46
|
+
{
|
|
47
|
+
"services": ["s3", "sdb"],
|
|
48
|
+
"config": {
|
|
49
|
+
"endpoint": "{scheme}://{service}.amazonaws.com"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"priority": 999,
|
|
56
|
+
"regionPrefix": "",
|
|
57
|
+
"rules": [
|
|
58
|
+
{
|
|
59
|
+
"services": ["s3"],
|
|
60
|
+
"config": {
|
|
61
|
+
"endpoint": "{scheme}://{service}-{region}.amazonaws.com"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"services": ["cloudfront", "iam", "importexport", "route53", "sts"],
|
|
66
|
+
"config": {
|
|
67
|
+
"endpoint": "{scheme}://{service}.amazonaws.com"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"config": {
|
|
72
|
+
"endpoint": "{scheme}://{service}.{region}.amazonaws.com"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Aws
|
|
2
|
+
module Api
|
|
3
|
+
# @api private
|
|
4
|
+
# This module loads the API documentation for the given API.
|
|
5
|
+
module Docstrings
|
|
6
|
+
|
|
7
|
+
def self.apply(client_class, path)
|
|
8
|
+
api = client_class.api.definition
|
|
9
|
+
docs = File.open(path, 'r', encoding: 'UTF-8') { |f| f.read }
|
|
10
|
+
docs = MultiJson.load(docs)
|
|
11
|
+
|
|
12
|
+
api['documentation'] = docs['service']
|
|
13
|
+
|
|
14
|
+
docs['operations'].each do |operation, doc|
|
|
15
|
+
api['operations'][operation]['documentation'] = doc
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
docs['shapes'].each do |shape_name, shape|
|
|
19
|
+
api['shapes'][shape_name]['documentation'] = shape['base']
|
|
20
|
+
shape['refs'].each do |ref,doc|
|
|
21
|
+
target_shape_name, member = ref.split('$')
|
|
22
|
+
target_shape = api['shapes'][target_shape_name]
|
|
23
|
+
case target_shape['type']
|
|
24
|
+
when 'structure' then target_shape['members'][member]['documentation'] = doc
|
|
25
|
+
when 'list' then target_shape[member]['documentation'] = doc
|
|
26
|
+
when 'map' then target_shape[member]['documentation'] = doc
|
|
27
|
+
else raise 'not handled'
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
client_class.set_api(Seahorse::Model::Api.new(api))
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
require 'multi_json'
|
|
2
|
+
require 'erb'
|
|
3
|
+
|
|
4
|
+
module Aws
|
|
5
|
+
module Api
|
|
6
|
+
class Documenter
|
|
7
|
+
|
|
8
|
+
def initialize(svc_module, docs_path)
|
|
9
|
+
@svc_module = svc_module
|
|
10
|
+
@svc_name = svc_module.name.split('::').last
|
|
11
|
+
@client_class = svc_module.const_get(:Client)
|
|
12
|
+
Aws::Api::Docstrings.apply(@client_class, docs_path)
|
|
13
|
+
@api = @client_class.api
|
|
14
|
+
@full_name = @api.metadata('serviceFullName')
|
|
15
|
+
@error_names = @api.operations.map {|_,o| o.errors.map(&:name) }
|
|
16
|
+
@error_names = @error_names.flatten.uniq.sort
|
|
17
|
+
@namespace = YARD::Registry['Aws']
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def apply
|
|
21
|
+
document_service
|
|
22
|
+
document_client
|
|
23
|
+
document_errors
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
private
|
|
27
|
+
|
|
28
|
+
def document_service
|
|
29
|
+
yard_mod = YARD::CodeObjects::ModuleObject.new(@namespace, @svc_name)
|
|
30
|
+
yard_mod.docstring = service_docstring
|
|
31
|
+
yard_mod.docstring.add_tag(YARD::Tags::Tag.new(:service, @svc_name))
|
|
32
|
+
@namespace = yard_mod
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def service_docstring
|
|
36
|
+
path = "doc-src/services/#{@svc_name}/service.md"
|
|
37
|
+
path = 'doc-src/services/default/service.md' unless File.exists?(path)
|
|
38
|
+
template = read(path)
|
|
39
|
+
svc_name = @svc_name
|
|
40
|
+
api = @api
|
|
41
|
+
full_name = @full_name
|
|
42
|
+
ERB.new(template).result(binding)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def document_errors
|
|
46
|
+
yard_mod = YARD::CodeObjects::ModuleObject.new(@namespace, 'Errors')
|
|
47
|
+
yard_mod.docstring = errors_docstring
|
|
48
|
+
|
|
49
|
+
base_error = YARD::CodeObjects::ClassObject.new(yard_mod, 'ServiceError')
|
|
50
|
+
base_error.docstring = "Base class for all Aws::#{@svc_name} errors."
|
|
51
|
+
base_error.superclass = YARD::Registry['Aws::Errors::ServiceError']
|
|
52
|
+
|
|
53
|
+
@error_names.each do |error_name|
|
|
54
|
+
error_klass = YARD::CodeObjects::ClassObject.new(yard_mod, error_name)
|
|
55
|
+
error_klass.superclass = base_error
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def errors_docstring
|
|
60
|
+
path = "doc-src/services/#{@svc_name}/errors.md"
|
|
61
|
+
path = 'doc-src/services/default/errors.md' unless File.exists?(path)
|
|
62
|
+
template = read(path)
|
|
63
|
+
svc_name = @svc_name
|
|
64
|
+
api = @api
|
|
65
|
+
full_name = @full_name
|
|
66
|
+
known_errors = @error_names
|
|
67
|
+
ERB.new(template).result(binding)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def document_client
|
|
71
|
+
yard_class = YARD::CodeObjects::ClassObject.new(@namespace, 'Client')
|
|
72
|
+
yard_class.superclass = YARD::Registry['Seahorse::Client::Base']
|
|
73
|
+
yard_class.docstring = client_docstring
|
|
74
|
+
document_client_constructor(yard_class)
|
|
75
|
+
document_client_operations(yard_class)
|
|
76
|
+
document_client_waiters(yard_class)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def client_docstring
|
|
80
|
+
path = "doc-src/services/#{@svc_name}/client.md"
|
|
81
|
+
path = 'doc-src/services/default/client.md' unless File.exists?(path)
|
|
82
|
+
render(path)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def render(path)
|
|
86
|
+
svc_name = @svc_name
|
|
87
|
+
api = @api
|
|
88
|
+
full_name = @full_name
|
|
89
|
+
ERB.new(File.read(path)).result(binding)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def document_client_constructor(namespace)
|
|
93
|
+
constructor = YARD::CodeObjects::MethodObject.new(namespace, :initialize)
|
|
94
|
+
constructor.group = 'Constructor'
|
|
95
|
+
constructor.scope = :instance
|
|
96
|
+
constructor.parameters << ['options', '{}']
|
|
97
|
+
constructor.docstring = client_constructor_docstring
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def client_constructor_docstring
|
|
101
|
+
<<-DOCS.strip
|
|
102
|
+
Constructs an API client.
|
|
103
|
+
#{client_constructor_options}
|
|
104
|
+
@return [#{@client_class.name}] Returns an API client.
|
|
105
|
+
DOCS
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def client_constructor_options
|
|
109
|
+
options = {}
|
|
110
|
+
@client_class.plugins.each do |plugin|
|
|
111
|
+
if p = YARD::Registry[plugin.name]
|
|
112
|
+
p.tags.each do |tag|
|
|
113
|
+
if tag.tag_name == 'seahorse_client_option'
|
|
114
|
+
option_name = tag.text.match(/.+(:\w+)/)[1]
|
|
115
|
+
option_text = "@option options " + tag.text.split("\n").join("\n ")
|
|
116
|
+
options[option_name] = option_text +
|
|
117
|
+
" See {#{plugin.name}} for more details."
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
options.sort_by { |k,v| k }.map(&:last).join("\n")
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def document_client_operations(namespace)
|
|
126
|
+
@api.operations.each do |method_name, operation|
|
|
127
|
+
document_client_operation(namespace, method_name, operation)
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def document_client_operation(namespace, method_name, operation)
|
|
132
|
+
m = YARD::CodeObjects::MethodObject.new(namespace, method_name)
|
|
133
|
+
m.group = 'Service Operations'
|
|
134
|
+
m.scope = :instance
|
|
135
|
+
m.parameters << ['params', '{}']
|
|
136
|
+
m.docstring = operation_docstring(method_name, operation)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def operation_docstring(method_name, operation)
|
|
140
|
+
|
|
141
|
+
documentor = OperationDocumenter.new(
|
|
142
|
+
svc_var_name: @svc_name.downcase,
|
|
143
|
+
method_name: method_name,
|
|
144
|
+
operation: operation)
|
|
145
|
+
|
|
146
|
+
tabs = Tabulator.new.tap do |t|
|
|
147
|
+
t.tab(method_name, 'Formatting Example') do
|
|
148
|
+
"<pre><code>#{documentor.example}</code></pre>"
|
|
149
|
+
end
|
|
150
|
+
t.tab(method_name, 'Request Parameters') do
|
|
151
|
+
documentor.input
|
|
152
|
+
end
|
|
153
|
+
t.tab(method_name, 'Response Structure') do
|
|
154
|
+
documentor.output
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
errors = (operation.errors || []).map { |shape| shape.name }
|
|
159
|
+
errors = errors.map { |e| "@raise [Errors::#{e}]" }.join("\n")
|
|
160
|
+
|
|
161
|
+
docstring = <<-DOCSTRING.strip
|
|
162
|
+
<p>Calls the #{operation.name} operation.<p>
|
|
163
|
+
#{documentor.api_ref(operation)}
|
|
164
|
+
#{tabs}
|
|
165
|
+
@param [Hash] params ({})
|
|
166
|
+
@return [PageableResponse]
|
|
167
|
+
#{errors}
|
|
168
|
+
DOCSTRING
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
def document_client_waiters(yard_class)
|
|
172
|
+
m = YARD::CodeObjects::MethodObject.new(yard_class, :wait_until)
|
|
173
|
+
m.scope = :instance
|
|
174
|
+
m.parameters << ['waiter_name', nil]
|
|
175
|
+
m.parameters << ['params', '{}']
|
|
176
|
+
m.docstring = YARD::Registry['Aws::Client#wait_until'].docstring
|
|
177
|
+
|
|
178
|
+
waiters = @client_class.waiters.waiter_names.sort.inject('') do |w,name|
|
|
179
|
+
operation = @client_class.waiters.waiter(name).send(:operation_name)
|
|
180
|
+
w << "<tr><td><tt>:#{name}</tt></td><td>{##{operation}}</td></tr>"
|
|
181
|
+
end
|
|
182
|
+
docstring = <<-DOCSTRING
|
|
183
|
+
Returns the list of supported waiters. The following table lists the supported
|
|
184
|
+
waiters and the client method they call:
|
|
185
|
+
<table>
|
|
186
|
+
<thead>
|
|
187
|
+
<tr><th>Waiter Name</th><th>Client Method</th></tr>
|
|
188
|
+
</thead>
|
|
189
|
+
<tbody>
|
|
190
|
+
#{waiters}
|
|
191
|
+
</tbody>
|
|
192
|
+
</table>
|
|
193
|
+
@return [Array<Symbol>] the list of supported waiters.
|
|
194
|
+
DOCSTRING
|
|
195
|
+
m = YARD::CodeObjects::MethodObject.new(yard_class, :waiter_names)
|
|
196
|
+
m.scope = :instance
|
|
197
|
+
m.docstring = docstring
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
class Tabulator
|
|
201
|
+
|
|
202
|
+
def initialize
|
|
203
|
+
@tabs = []
|
|
204
|
+
@tab_contents = []
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
def tab(method_name, tab_name, &block)
|
|
208
|
+
tab_class = tab_name.downcase.gsub(/[^a-z]+/i, '-')
|
|
209
|
+
tab_id = "#{method_name.to_s.gsub(/_/, '-')}-#{tab_class}"
|
|
210
|
+
class_names = ['tab-contents', tab_class]
|
|
211
|
+
@tabs << [tab_id, tab_name]
|
|
212
|
+
@tab_contents << "<div class=\"#{class_names.join(' ')}\" id=\"#{tab_id}\">"
|
|
213
|
+
@tab_contents << yield
|
|
214
|
+
@tab_contents << '</div>'
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def to_html
|
|
218
|
+
lines = []
|
|
219
|
+
lines << '<div class="tab-box">'
|
|
220
|
+
lines << '<ul class="tabs">'
|
|
221
|
+
@tabs.each do |tab_id, tab_name|
|
|
222
|
+
lines << "<li data-tab-id=\"#{tab_id}\">#{tab_name}</li>"
|
|
223
|
+
end
|
|
224
|
+
lines << '</ul>'
|
|
225
|
+
lines.concat(@tab_contents)
|
|
226
|
+
lines << '</div>'
|
|
227
|
+
lines.join
|
|
228
|
+
end
|
|
229
|
+
alias inspect to_html
|
|
230
|
+
alias to_str to_html
|
|
231
|
+
alias to_s to_html
|
|
232
|
+
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
def read(path)
|
|
236
|
+
File.open(path, 'r', encoding: 'UTF-8') { |f| f.read }
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
end
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
module Aws
|
|
2
2
|
module Api
|
|
3
|
-
class
|
|
3
|
+
class OperationDocumenter
|
|
4
4
|
|
|
5
|
-
def initialize(
|
|
6
|
-
@operation = operation
|
|
7
|
-
@example =
|
|
5
|
+
def initialize(options)
|
|
6
|
+
@operation = options[:operation]
|
|
7
|
+
@example = OperationExample.new(options)
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def input
|
|
11
11
|
params(nil) do
|
|
12
12
|
if @operation.input
|
|
13
|
-
structure(@operation.input)
|
|
13
|
+
structure(@operation.input, [])
|
|
14
14
|
else
|
|
15
15
|
[]
|
|
16
16
|
end
|
|
@@ -20,7 +20,7 @@ module Aws
|
|
|
20
20
|
def output
|
|
21
21
|
params(nil) do
|
|
22
22
|
if @operation.output
|
|
23
|
-
structure(@operation.output)
|
|
23
|
+
structure(@operation.output, [])
|
|
24
24
|
else
|
|
25
25
|
[]
|
|
26
26
|
end
|
|
@@ -42,64 +42,75 @@ module Aws
|
|
|
42
42
|
|
|
43
43
|
def api_ref(shape)
|
|
44
44
|
docs = shape.nil? ? '' : shape.documentation
|
|
45
|
-
if docs
|
|
46
|
-
"<div class=\"api-ref\">#{clean(docs)}</div>"
|
|
45
|
+
if docs && !docs.empty?
|
|
46
|
+
"<div class=\"api-ref\">#{clean(docs)}</div>"
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
private
|
|
51
51
|
|
|
52
52
|
def params(shape, &block)
|
|
53
|
-
|
|
53
|
+
if shape && shape.name == 'AttributeValue'
|
|
54
|
+
['<p>An attribute value may be one of:<ul><li>`String`</li><li>`Numeric`</li><li>`IO`</li><li>`Set<String,Numeric,IO>`</li></ul></p>']
|
|
55
|
+
else
|
|
56
|
+
['<div class="params">', api_ref(shape)] + yield + ['</div>']
|
|
57
|
+
end
|
|
54
58
|
end
|
|
55
59
|
|
|
56
|
-
def param(shape, key_name, value_type, required, &block)
|
|
60
|
+
def param(shape, key_name, value_type, required, visited, &block)
|
|
57
61
|
lines = []
|
|
58
62
|
lines << '<div class="param">'
|
|
59
|
-
lines << entry(shape, key_name, value_type, required)
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
lines << entry(shape, key_name, value_type, required, visited)
|
|
64
|
+
|
|
65
|
+
if visited.include?(shape)
|
|
66
|
+
lines << "AttributeValue, recursive"
|
|
67
|
+
else
|
|
68
|
+
visited = visited + [shape]
|
|
69
|
+
yield(lines) if block_given?
|
|
70
|
+
lines += nested_params(shape, visited)
|
|
71
|
+
end
|
|
72
|
+
|
|
62
73
|
lines << '</div>'
|
|
63
74
|
lines
|
|
64
75
|
end
|
|
65
76
|
|
|
66
|
-
def nested_params(shape)
|
|
77
|
+
def nested_params(shape, visited)
|
|
67
78
|
if leaf?(shape)
|
|
68
|
-
nested(shape)
|
|
79
|
+
nested(shape, visited)
|
|
69
80
|
else
|
|
70
|
-
params(shape) { nested(shape) }
|
|
81
|
+
params(shape) { nested(shape, visited) }
|
|
71
82
|
end
|
|
72
83
|
end
|
|
73
84
|
|
|
74
|
-
def nested(shape)
|
|
85
|
+
def nested(shape, visited)
|
|
75
86
|
case shape
|
|
76
|
-
when Seahorse::Model::Shapes::Structure then structure(shape)
|
|
77
|
-
when Seahorse::Model::Shapes::Map then map(shape)
|
|
78
|
-
when Seahorse::Model::Shapes::List then list(shape)
|
|
87
|
+
when Seahorse::Model::Shapes::Structure then structure(shape, visited)
|
|
88
|
+
when Seahorse::Model::Shapes::Map then map(shape, visited)
|
|
89
|
+
when Seahorse::Model::Shapes::List then list(shape, visited)
|
|
79
90
|
else [api_ref(shape)]
|
|
80
91
|
end
|
|
81
92
|
end
|
|
82
93
|
|
|
83
|
-
def structure(shape)
|
|
94
|
+
def structure(shape, visited)
|
|
84
95
|
shape.members.inject([]) do |lines, (member_name, member_shape)|
|
|
85
|
-
lines += param(member_shape, member_name, shape_type(member_shape), shape.required.include?(member_name))
|
|
96
|
+
lines += param(member_shape, member_name, shape_type(member_shape), shape.required.include?(member_name), visited)
|
|
86
97
|
end
|
|
87
98
|
end
|
|
88
99
|
|
|
89
|
-
def map(shape)
|
|
90
|
-
param(shape.value, key_name(shape), value_type(shape), false)
|
|
100
|
+
def map(shape, visited)
|
|
101
|
+
param(shape.value, key_name(shape), value_type(shape), false, visited)
|
|
91
102
|
end
|
|
92
103
|
|
|
93
|
-
def list(shape)
|
|
104
|
+
def list(shape, visited)
|
|
94
105
|
case shape.member
|
|
95
|
-
when Seahorse::Model::Shapes::Structure then structure(shape.member)
|
|
96
|
-
when Seahorse::Model::Shapes::Map then map(shape.member)
|
|
106
|
+
when Seahorse::Model::Shapes::Structure then structure(shape.member, visited)
|
|
107
|
+
when Seahorse::Model::Shapes::Map then map(shape.member, visited)
|
|
97
108
|
when Seahorse::Model::Shapes::List then raise NotImplementedError
|
|
98
109
|
else [api_ref(shape)]
|
|
99
110
|
end
|
|
100
111
|
end
|
|
101
112
|
|
|
102
|
-
def entry(shape, key_name, value_type, required)
|
|
113
|
+
def entry(shape, key_name, value_type, required, visited)
|
|
103
114
|
classes = ['key']
|
|
104
115
|
classes << 'required' if required
|
|
105
116
|
line = '<div class="entry">'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
module Aws
|
|
2
2
|
module Api
|
|
3
|
-
class
|
|
3
|
+
class OperationExample
|
|
4
4
|
|
|
5
5
|
include Seahorse::Model::Shapes
|
|
6
6
|
|
|
7
|
-
def initialize(
|
|
8
|
-
@obj_name =
|
|
9
|
-
@method_name = method_name
|
|
10
|
-
@operation = operation
|
|
7
|
+
def initialize(options)
|
|
8
|
+
@obj_name = options[:svc_var_name]
|
|
9
|
+
@method_name = options[:method_name]
|
|
10
|
+
@operation = options[:operation]
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def to_str
|
|
@@ -20,58 +20,67 @@ module Aws
|
|
|
20
20
|
|
|
21
21
|
def params
|
|
22
22
|
return '' if @operation.input.nil?
|
|
23
|
-
structure(@operation.input, '')
|
|
23
|
+
structure(@operation.input, '', [])
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def structure(shape, i)
|
|
26
|
+
def structure(shape, i, visited)
|
|
27
27
|
lines = ['{']
|
|
28
28
|
shape.members.each do |member_name, member_shape|
|
|
29
29
|
if shape.required.include?(member_name)
|
|
30
30
|
lines << "#{i} # required"
|
|
31
31
|
end
|
|
32
|
-
lines << "#{i} #{member_name}: #{member(member_shape, i + ' ')},"
|
|
32
|
+
lines << "#{i} #{member_name}: #{member(member_shape, i + ' ', visited)},"
|
|
33
33
|
end
|
|
34
34
|
lines << "#{i}}"
|
|
35
35
|
lines.join("\n")
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
def map(shape, i)
|
|
38
|
+
def map(shape, i, visited)
|
|
39
39
|
if multiline?(shape.value)
|
|
40
|
-
multiline_map(shape, i)
|
|
40
|
+
multiline_map(shape, i, visited)
|
|
41
41
|
else
|
|
42
42
|
"{ #{key_name(shape)} => #{value(shape.value)} }"
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
def multiline_map(shape, i)
|
|
46
|
+
def multiline_map(shape, i, visited)
|
|
47
47
|
lines = ["{"]
|
|
48
|
-
lines << "#{i} #{key_name(shape)} => #{member(shape.value, i + ' ')},"
|
|
49
|
-
lines << "#{i} # repeated ..."
|
|
48
|
+
lines << "#{i} #{key_name(shape)} => #{member(shape.value, i + ' ', visited)},"
|
|
50
49
|
lines << "#{i}}"
|
|
51
50
|
lines.join("\n")
|
|
52
51
|
end
|
|
53
52
|
|
|
54
|
-
def list(shape, i)
|
|
53
|
+
def list(shape, i, visited)
|
|
55
54
|
if multiline?(shape.member)
|
|
56
|
-
multiline_list(shape, i)
|
|
55
|
+
multiline_list(shape, i, visited)
|
|
57
56
|
else
|
|
58
57
|
"[#{value(shape.member)}, '...']"
|
|
59
58
|
end
|
|
60
59
|
end
|
|
61
60
|
|
|
62
|
-
def multiline_list(shape, i)
|
|
61
|
+
def multiline_list(shape, i, visited)
|
|
63
62
|
lines = ["["]
|
|
64
|
-
lines << "#{i} #{member(shape.member, i + ' ')},"
|
|
65
|
-
lines << "#{i} # repeated ... "
|
|
63
|
+
lines << "#{i} #{member(shape.member, i + ' ', visited)},"
|
|
66
64
|
lines << "#{i}]"
|
|
67
65
|
lines.join("\n")
|
|
68
66
|
end
|
|
69
67
|
|
|
70
|
-
def member(shape, i)
|
|
68
|
+
def member(shape, i, visited)
|
|
69
|
+
if visited.include?(shape.name)
|
|
70
|
+
recursive = ['{']
|
|
71
|
+
recursive << "#{i} # recursive #{shape.name} ..."
|
|
72
|
+
recursive << "#{i}}"
|
|
73
|
+
return recursive.join("\n")
|
|
74
|
+
elsif shape.name == 'AttributeValue'
|
|
75
|
+
msg='"value", #<String,Numeric,IO,Set>'
|
|
76
|
+
return msg
|
|
77
|
+
else
|
|
78
|
+
visited = visited + [shape.name]
|
|
79
|
+
end
|
|
71
80
|
case shape
|
|
72
|
-
when Seahorse::Model::Shapes::Structure then structure(shape, i)
|
|
73
|
-
when Seahorse::Model::Shapes::Map then map(shape, i)
|
|
74
|
-
when Seahorse::Model::Shapes::List then list(shape, i)
|
|
81
|
+
when Seahorse::Model::Shapes::Structure then structure(shape, i, visited)
|
|
82
|
+
when Seahorse::Model::Shapes::Map then map(shape, i, visited)
|
|
83
|
+
when Seahorse::Model::Shapes::List then list(shape, i, visited)
|
|
75
84
|
else value(shape)
|
|
76
85
|
end
|
|
77
86
|
end
|
|
@@ -78,12 +78,13 @@ module Aws
|
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
customize 'cloudsearchdomain' do
|
|
81
|
-
remove_plugin 'Aws::Plugins::RequestSigner'
|
|
82
81
|
remove_plugin 'Aws::Plugins::RegionalEndpoint'
|
|
82
|
+
add_plugin 'Aws::Plugins::CSDConditionalSigning'
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
customize 'dynamodb' do
|
|
86
86
|
add_plugin 'Aws::Plugins::DynamoDBExtendedRetries'
|
|
87
|
+
add_plugin 'Aws::Plugins::DynamoDBSimpleAttributes'
|
|
87
88
|
end
|
|
88
89
|
|
|
89
90
|
customize 'ec2' do
|
|
@@ -110,17 +111,20 @@ module Aws
|
|
|
110
111
|
end
|
|
111
112
|
|
|
112
113
|
customize 'route53' do
|
|
114
|
+
add_plugin 'Aws::Plugins::Route53IdFix'
|
|
113
115
|
reshape 'PageMaxItems', 'type' => 'integer'
|
|
114
116
|
end
|
|
115
117
|
|
|
116
118
|
customize 's3' do
|
|
117
119
|
add_plugin 'Aws::Plugins::S3BucketDns'
|
|
120
|
+
add_plugin 'Aws::Plugins::S3Expect100Continue'
|
|
118
121
|
add_plugin 'Aws::Plugins::S3CompleteMultipartUploadFix'
|
|
119
122
|
add_plugin 'Aws::Plugins::S3GetBucketLocationFix'
|
|
120
123
|
add_plugin 'Aws::Plugins::S3LocationConstraint'
|
|
121
124
|
add_plugin 'Aws::Plugins::S3Md5s'
|
|
122
125
|
add_plugin 'Aws::Plugins::S3Redirects'
|
|
123
126
|
add_plugin 'Aws::Plugins::S3SseCpk'
|
|
127
|
+
add_plugin 'Aws::Plugins::S3UrlEncodedKeys'
|
|
124
128
|
end
|
|
125
129
|
|
|
126
130
|
customize 'sqs' do
|