README.md in alis-sdk-ruby-0.1.0 vs README.md in alis-sdk-ruby-0.13.0

- old
+ new

@@ -1,39 +1,62 @@ -# Alis::Sdk::Ruby +# AlisSdkRuby -Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/alis/sdk/ruby`. To experiment with that code, run `bin/console` for an interactive prompt. +This is the Version 0 of the alis-sdk-ruby gem. -TODO: Delete this and the text above, and describe your gem +## WARNING -## Installation +Please read through this `README.md` and `alis-sdk-ruby.gemspec` then tailor it with your gem needs before serving it for any official usage or gem publishing. If you have any questions, issue or feature requests for this generated gem, feel free to open an issue or PR againt [`AWS SDK for Ruby`](https://github.com/aws/aws-sdk-ruby) -Add this line to your application's Gemfile: +## API Client +Initialize a service client and list all operations available. + ```ruby -gem 'alis-sdk-ruby' +require 'alis-sdk-ruby' + +client = AlisSdkRuby::Client.new + +puts client.operation_names ``` -And then execute: +For each operation usage example, see `lib/client.rb` documentation block per operation - $ bundle +## Authorizer -Or install it yourself as: +For operations used custom authorizer, you can provide your own authorizer token logic at `lib/plugins/authorizer.rb` under method `generate_token`. For more information, please see [here](http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html). - $ gem install alis-sdk-ruby +## AWS Credentials -## Usage +For those API requets that are authenticated with AWS Credentials (e.g. IAM roles), you would need to configure `:credentials` and `:region` that helps sigining request with [AWS Signature V4](http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). You can also provide those information via your environment: -TODO: Write usage instructions here +The SDK searches the following locations for credentials: -## Development +* `ENV['AWS_ACCESS_KEY_ID']` and `ENV['AWS_SECRET_ACCESS_KEY']` +* Unless `ENV['AWS_SDK_CONFIG_OPT_OUT']` is set, the shared configuration files (`~/.aws/credentials` and `~/.aws/config`) will be checked for a `role_arn` and `source_profile`, which if present will be used to attempt to assume a role. +* The shared credentials ini file at `~/.aws/credentials` ([more information](http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs)) +* Unless `ENV['AWS_SDK_CONFIG_OPT_OUT']` is set, the shared configuration ini file at `~/.aws/config` will also be parsed for credentials. +* From an instance profile when running on EC2, or from the ECS credential provider when running in an ECS container with that feature enabled. -After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. +The SDK searches the following locations for a region: -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). +* `ENV['AWS_REGION']` +* Unless `ENV['AWS_SDK_CONFIG_OPT_OUT']` is set, the shared configuration files (`~/.aws/credentials` and `~/.aws/config`) will also be checked for a region selection. -## Contributing +Valid region and credentials options are: -Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/alis-sdk-ruby. +* `:region` - A string like `us-west-2`. +* `:credentials` - An instance of one of the following classes: +* [`Aws::Credentials`](http://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Credentials.html) +* [`Aws::SharedCredentials`](http://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SharedCredentials.html) +* [`Aws::InstanceProfileCredentials`](http://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/InstanceProfileCredentials.html) +* [`Aws::AssumeRoleCredentials`](http://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/AssumeRoleCredentials.html) +## API Key + +Simply provide an `:api_key` value when calling an API along with other params, this value will be picked up in the `x-api-key` header value. + ## License -The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). +DEFAULT: This library is distributed under the +[Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) + +Feel free to change your license specification here and at `alis-sdk-ruby.gemspec`