This repository was archived by the owner on Oct 29, 2022. It is now read-only.

Repository files navigation

AWS SDK Core Build StatusCode ClimateCoverage Status

This library is in a developer preview period.

We are working on version 2 of the official AWS SDK for Ruby. This library is the first part of our v2 strategy. AWS SDK Core is an updated set of service clients. Our goal is to make them more flexible and extensible than the clients in version 1 of the Ruby SDK.

For version 1.0 of the Ruby SDK, see aws/aws-sdk-ruby.

Upgrade Notes

During the preview period, there have been some minor backwards incompatible updates between release candidates. These changes are summarized below.

2.0.0.rc15 Upgrading Notes

RC15 updates the Aws::DynamoDB::Client API operations to accept and return simple attribute values. Prior to rc14 values were specified as:

{ s: 'string-value' }
{ n: "5.0" }

This update applies a plugin that allows users to specify values using simple Ruby types, such as Integer, Float, Set, String, etc.

"string-value"
5.0

This affects every DynamoDB request and response structure that accepts or returns an attribute value. To revert to the older format, disable simple attributes:

# disable this new default behavior
Aws::DynamoDB::Client.new(simple_attributes: false)

Please Note - RC15 may be the final release candidate version prior to a 2.0.0 final release of aws-sdk-core.

2.0.0.rc14 Upgrading Notes

RC14 simplifies the API versioning strategy. This may require small changes for users that use the API version locking options. Also, there are minor changes when configuring raw endpoints.

  • Versioned client classes removed, e.g. Aws::S3::Client::V20060301.new should be replaced with Aws::S3::Client.new The :api_version constructor option is no longer accepted.

  • Aws helper methods for client construction deprecated; For example, calling Aws.s3 will generate a deprecation warning. Call Aws::S3::Client.new instead. Top-level helpers will be removed as of v2.0.0 final.

  • When configuring an :endpoint directly, you must now specify the HTTP scheme, e.g. "http://localhost:3000", instead of "localhost:3000". Please note, this should only be done for testing. Normally you only need to configure a :region.

2.0.0.rc11 Upgrading Notes

RC 11 requires a few minor updates. These should be the final public-facing changes before 2.0.0 final.

  • The prefered constructor for services is now using the client class, example:

    # deprecated, will be removed for 2.0.0 final
    Aws::S3.new
    # preferred
    Aws::S3::Client.new
    
  • The :raw_json option for JSON protocol based services has been renamed to :simple_json

  • The short name for Aws::SimpleDB has been renamed from sdb to simpledb.

Links of Interest

Installation

You can install the AWS SDK Core from rubygems:

gem install aws-sdk-core --pre

If you are using Bundler, we recommend that you express a major version dependency (this library uses semantic versioning):

gem 'aws-sdk-core', '~> 2.0'

Until the final release becomes available on Rubygems, leave off the version dependency in your Gemfile so Bundler can find it.

Note: AWS SDK Core requires Ruby 1.9.3+.

Configuration

To use the Ruby SDK, you must configure a region and your AWS account access credentials.

Region

You can export a default region to ENV:

export AWS_REGION='us-west-2'

Or you can configure a region in code:

# default regionAws.config[:region]='us-west-2'# per-service :regions3=Aws::S3::Client.new(region:'us-east-1')

Credentials

Please take care to never commit credentials to source control. We strongly recommended loading credentials from an external source. By default, the Ruby SDK will attempt to load credentials from the following sources:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • The shared credentials ini file at HOME/.aws/credentials
  • From an instance profile when running on EC2

Alternatively, you can specify your credentials directly using one of the following credential classes:

  • Aws::Credentials
  • Aws::SharedCredentials
  • Aws::InstanceProfileCredentials
# default credentialsAws.config[:credentials]=Aws::SharedCredentials.new(profile_name:'myprofile')# per-service :credentialss3=Aws::S3::Client.new(credentials: Aws::SharedCredentials.new(profile_name:'myprofile')

Basic Usage

To make a request, you need to construct a service client.

s3=Aws::S3::Client.new

Each client provides one method per API operation. Refer to the API documentation for a complete list of available methods.

# get a list of buckets in Amazon S3resp=s3.list_bucketsputsresp.buckets.map(&:name)

API methods accept a request params as a hash, and return structured responses.

resp=s3.list_objects(bucket: 'aws-sdk-core',max_keys: 2)resp.contents.eachdo |object|
puts"#{object.key} => #{object.etag}"end

Paging Responses

Many AWS operations limit the number of results returned with each response. A simple paging interface is provided that works with every AWS request.

# yields once per response, even works with non-paged requestss3.list_objects(bucket:'aws-sdk').eachdo |resp|
putsresp.contents.map(&:key)end

If you prefer to control paging yourself, all returned responses have the same helper methods:

# make a request that returns a truncated responseresp=s3.list_objects(bucket:'aws-sdk')resp.last_page?#=> falseresp.next_page?#=> trueresp=resp.next_page# send a request for the next response pageresp=resp.next_pageuntilresp.last_page?

Interactive Console

AWS SDK Core ships with a REPL that acts as an interactive console. You can access the REPL by running aws.rb from the command line.

$ aws.rbAws> ec2.describe_instances.reservations.first.instances.first
<structinstance_id="i-1234567",image_id="ami-7654321",state=<structcode=16,name="running">,
...>

Call #service_classes to get a list of available service helpers and the class they construct.

Aws> service_clients{:autoscaling=>Aws::AutoScaling::Client,:cloudformation=>Aws::CloudFormation::Client,:cloudfront=>Aws::CloudFront::Client,:cloudsearch=>Aws::CloudSearch::Client,
...
:swf=>Aws::SWF::Client}

Versioning

This project uses semantic versioning. When the project leaves the developer preview state, we will continue by versioning from 2.0. Until then, all versions will be suffixed by a release candidate version.

Supported Services

Service NameService ClassAPI Versions
Amazon CloudFrontCloudFront2014-05-31
Amazon CloudSearchCloudSearch2013-01-01
Amazon CloudSearch DomainCloudSearchDomain2013-01-01
Amazon CloudWatchCloudWatch2010-08-01
Amazon CloudWatch LogsCloudWatchLogs2014-03-28
Amazon Cognito IdentityCognitoIdentity2014-06-30
Amazon Cognito SyncCognitoSync2014-06-30
Amazon DynamoDBDynamoDB2012-08-10
Amazon Elastic Compute CloudEC22014-06-15
Amazon Elastic MapReduceEMR2009-03-31
Amazon Elastic TranscoderElasticTranscoder2012-09-25
Amazon ElastiCacheElastiCache2014-07-15
Amazon GlacierGlacier2012-06-01
Amazon KinesisKinesis2013-12-02
Amazon RedshiftRedshift2012-12-01
Amazon Relational Database ServiceRDS2013-09-09
Amazon Route 53Route532013-04-01
Amazon Route 53 DomainsRoute53Domains2014-05-15
Amazon Simple Email ServiceSES2010-12-01
Amazon Simple Notification ServiceSNS2010-03-31
Amazon Simple Queue ServiceSQS2012-11-05
Amazon Simple Storage ServiceS32006-03-01
Amazon Simple Workflow ServiceSWF2012-01-25
Amazon SimpleDBSimpleDB2009-04-15
Auto ScalingAutoScaling2011-01-01
AWS CloudFormationCloudFormation2010-05-15
AWS CloudTrailCloudTrail2013-11-01
AWS Data PipelineDataPipeline2012-10-29
AWS Direct ConnectDirectConnect2012-10-25
AWS Elastic BeanstalkElasticBeanstalk2010-12-01
AWS Identity and Access ManagementIAM2010-05-08
AWS Import/ExportImportExport2010-06-01
AWS OpsWorksOpsWorks2013-02-18
AWS Security Token ServiceSTS2011-06-15
AWS Storage GatewayStorageGateway2013-06-30
AWS SupportSupport2013-04-15
Elastic Load BalancingElasticLoadBalancing2012-06-01

License

This library is distributed under the apache license, version 2.0

copyright 2013. amazon web services, inc. all rights reserved.
licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at
http://www.apache.org/licenses/license-2.0
unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.

About

The core functionality of the AWS SDK for Ruby V2

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
This repository was archived by the owner on Oct 29, 2022. It is now read-only.

Repository files navigation

AWS SDK Core Build StatusCode ClimateCoverage Status

This library is in a developer preview period.

We are working on version 2 of the official AWS SDK for Ruby. This library is the first part of our v2 strategy. AWS SDK Core is an updated set of service clients. Our goal is to make them more flexible and extensible than the clients in version 1 of the Ruby SDK.

For version 1.0 of the Ruby SDK, see aws/aws-sdk-ruby.

Upgrade Notes

During the preview period, there have been some minor backwards incompatible updates between release candidates. These changes are summarized below.

2.0.0.rc15 Upgrading Notes

RC15 updates the Aws::DynamoDB::Client API operations to accept and return simple attribute values. Prior to rc14 values were specified as:

{ s: 'string-value' }
{ n: "5.0" }

This update applies a plugin that allows users to specify values using simple Ruby types, such as Integer, Float, Set, String, etc.

"string-value"
5.0

This affects every DynamoDB request and response structure that accepts or returns an attribute value. To revert to the older format, disable simple attributes:

# disable this new default behavior
Aws::DynamoDB::Client.new(simple_attributes: false)

Please Note - RC15 may be the final release candidate version prior to a 2.0.0 final release of aws-sdk-core.

2.0.0.rc14 Upgrading Notes

RC14 simplifies the API versioning strategy. This may require small changes for users that use the API version locking options. Also, there are minor changes when configuring raw endpoints.

  • Versioned client classes removed, e.g. Aws::S3::Client::V20060301.new should be replaced with Aws::S3::Client.new The :api_version constructor option is no longer accepted.

  • Aws helper methods for client construction deprecated; For example, calling Aws.s3 will generate a deprecation warning. Call Aws::S3::Client.new instead. Top-level helpers will be removed as of v2.0.0 final.

  • When configuring an :endpoint directly, you must now specify the HTTP scheme, e.g. "http://localhost:3000", instead of "localhost:3000". Please note, this should only be done for testing. Normally you only need to configure a :region.

2.0.0.rc11 Upgrading Notes

RC 11 requires a few minor updates. These should be the final public-facing changes before 2.0.0 final.

  • The prefered constructor for services is now using the client class, example:

    # deprecated, will be removed for 2.0.0 final
    Aws::S3.new
    # preferred
    Aws::S3::Client.new
    
  • The :raw_json option for JSON protocol based services has been renamed to :simple_json

  • The short name for Aws::SimpleDB has been renamed from sdb to simpledb.

Links of Interest

Installation

You can install the AWS SDK Core from rubygems:

gem install aws-sdk-core --pre

If you are using Bundler, we recommend that you express a major version dependency (this library uses semantic versioning):

gem 'aws-sdk-core', '~> 2.0'

Until the final release becomes available on Rubygems, leave off the version dependency in your Gemfile so Bundler can find it.

Note: AWS SDK Core requires Ruby 1.9.3+.

Configuration

To use the Ruby SDK, you must configure a region and your AWS account access credentials.

Region

You can export a default region to ENV:

export AWS_REGION='us-west-2'

Or you can configure a region in code:

# default regionAws.config[:region]='us-west-2'# per-service :regions3=Aws::S3::Client.new(region:'us-east-1')

Credentials

Please take care to never commit credentials to source control. We strongly recommended loading credentials from an external source. By default, the Ruby SDK will attempt to load credentials from the following sources:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • The shared credentials ini file at HOME/.aws/credentials
  • From an instance profile when running on EC2

Alternatively, you can specify your credentials directly using one of the following credential classes:

  • Aws::Credentials
  • Aws::SharedCredentials
  • Aws::InstanceProfileCredentials
# default credentialsAws.config[:credentials]=Aws::SharedCredentials.new(profile_name:'myprofile')# per-service :credentialss3=Aws::S3::Client.new(credentials: Aws::SharedCredentials.new(profile_name:'myprofile')

Basic Usage

To make a request, you need to construct a service client.

s3=Aws::S3::Client.new

Each client provides one method per API operation. Refer to the API documentation for a complete list of available methods.

# get a list of buckets in Amazon S3resp=s3.list_bucketsputsresp.buckets.map(&:name)

API methods accept a request params as a hash, and return structured responses.

resp=s3.list_objects(bucket: 'aws-sdk-core',max_keys: 2)resp.contents.eachdo |object|
puts"#{object.key} => #{object.etag}"end

Paging Responses

Many AWS operations limit the number of results returned with each response. A simple paging interface is provided that works with every AWS request.

# yields once per response, even works with non-paged requestss3.list_objects(bucket:'aws-sdk').eachdo |resp|
putsresp.contents.map(&:key)end

If you prefer to control paging yourself, all returned responses have the same helper methods:

# make a request that returns a truncated responseresp=s3.list_objects(bucket:'aws-sdk')resp.last_page?#=> falseresp.next_page?#=> trueresp=resp.next_page# send a request for the next response pageresp=resp.next_pageuntilresp.last_page?

Interactive Console

AWS SDK Core ships with a REPL that acts as an interactive console. You can access the REPL by running aws.rb from the command line.

$ aws.rbAws> ec2.describe_instances.reservations.first.instances.first
<structinstance_id="i-1234567",image_id="ami-7654321",state=<structcode=16,name="running">,
...>

Call #service_classes to get a list of available service helpers and the class they construct.

Aws> service_clients{:autoscaling=>Aws::AutoScaling::Client,:cloudformation=>Aws::CloudFormation::Client,:cloudfront=>Aws::CloudFront::Client,:cloudsearch=>Aws::CloudSearch::Client,
...
:swf=>Aws::SWF::Client}

Versioning

This project uses semantic versioning. When the project leaves the developer preview state, we will continue by versioning from 2.0. Until then, all versions will be suffixed by a release candidate version.

Supported Services

Service NameService ClassAPI Versions
Amazon CloudFrontCloudFront2014-05-31
Amazon CloudSearchCloudSearch2013-01-01
Amazon CloudSearch DomainCloudSearchDomain2013-01-01
Amazon CloudWatchCloudWatch2010-08-01
Amazon CloudWatch LogsCloudWatchLogs2014-03-28
Amazon Cognito IdentityCognitoIdentity2014-06-30
Amazon Cognito SyncCognitoSync2014-06-30
Amazon DynamoDBDynamoDB2012-08-10
Amazon Elastic Compute CloudEC22014-06-15
Amazon Elastic MapReduceEMR2009-03-31
Amazon Elastic TranscoderElasticTranscoder2012-09-25
Amazon ElastiCacheElastiCache2014-07-15
Amazon GlacierGlacier2012-06-01
Amazon KinesisKinesis2013-12-02
Amazon RedshiftRedshift2012-12-01
Amazon Relational Database ServiceRDS2013-09-09
Amazon Route 53Route532013-04-01
Amazon Route 53 DomainsRoute53Domains2014-05-15
Amazon Simple Email ServiceSES2010-12-01
Amazon Simple Notification ServiceSNS2010-03-31
Amazon Simple Queue ServiceSQS2012-11-05
Amazon Simple Storage ServiceS32006-03-01
Amazon Simple Workflow ServiceSWF2012-01-25
Amazon SimpleDBSimpleDB2009-04-15
Auto ScalingAutoScaling2011-01-01
AWS CloudFormationCloudFormation2010-05-15
AWS CloudTrailCloudTrail2013-11-01
AWS Data PipelineDataPipeline2012-10-29
AWS Direct ConnectDirectConnect2012-10-25
AWS Elastic BeanstalkElasticBeanstalk2010-12-01
AWS Identity and Access ManagementIAM2010-05-08
AWS Import/ExportImportExport2010-06-01
AWS OpsWorksOpsWorks2013-02-18
AWS Security Token ServiceSTS2011-06-15
AWS Storage GatewayStorageGateway2013-06-30
AWS SupportSupport2013-04-15
Elastic Load BalancingElasticLoadBalancing2012-06-01

License

This library is distributed under the apache license, version 2.0

copyright 2013. amazon web services, inc. all rights reserved.
licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at
http://www.apache.org/licenses/license-2.0
unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.

About

The core functionality of the AWS SDK for Ruby V2

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
This repository was archived by the owner on Oct 29, 2022. It is now read-only.

Repository files navigation

AWS SDK Core Build StatusCode ClimateCoverage Status

This library is in a developer preview period.

We are working on version 2 of the official AWS SDK for Ruby. This library is the first part of our v2 strategy. AWS SDK Core is an updated set of service clients. Our goal is to make them more flexible and extensible than the clients in version 1 of the Ruby SDK.

For version 1.0 of the Ruby SDK, see aws/aws-sdk-ruby.

Upgrade Notes

During the preview period, there have been some minor backwards incompatible updates between release candidates. These changes are summarized below.

2.0.0.rc15 Upgrading Notes

RC15 updates the Aws::DynamoDB::Client API operations to accept and return simple attribute values. Prior to rc14 values were specified as:

{ s: 'string-value' }
{ n: "5.0" }

This update applies a plugin that allows users to specify values using simple Ruby types, such as Integer, Float, Set, String, etc.

"string-value"
5.0

This affects every DynamoDB request and response structure that accepts or returns an attribute value. To revert to the older format, disable simple attributes:

# disable this new default behavior
Aws::DynamoDB::Client.new(simple_attributes: false)

Please Note - RC15 may be the final release candidate version prior to a 2.0.0 final release of aws-sdk-core.

2.0.0.rc14 Upgrading Notes

RC14 simplifies the API versioning strategy. This may require small changes for users that use the API version locking options. Also, there are minor changes when configuring raw endpoints.

  • Versioned client classes removed, e.g. Aws::S3::Client::V20060301.new should be replaced with Aws::S3::Client.new The :api_version constructor option is no longer accepted.

  • Aws helper methods for client construction deprecated; For example, calling Aws.s3 will generate a deprecation warning. Call Aws::S3::Client.new instead. Top-level helpers will be removed as of v2.0.0 final.

  • When configuring an :endpoint directly, you must now specify the HTTP scheme, e.g. "http://localhost:3000", instead of "localhost:3000". Please note, this should only be done for testing. Normally you only need to configure a :region.

2.0.0.rc11 Upgrading Notes

RC 11 requires a few minor updates. These should be the final public-facing changes before 2.0.0 final.

  • The prefered constructor for services is now using the client class, example:

    # deprecated, will be removed for 2.0.0 final
    Aws::S3.new
    # preferred
    Aws::S3::Client.new
    
  • The :raw_json option for JSON protocol based services has been renamed to :simple_json

  • The short name for Aws::SimpleDB has been renamed from sdb to simpledb.

Links of Interest

Installation

You can install the AWS SDK Core from rubygems:

gem install aws-sdk-core --pre

If you are using Bundler, we recommend that you express a major version dependency (this library uses semantic versioning):

gem 'aws-sdk-core', '~> 2.0'

Until the final release becomes available on Rubygems, leave off the version dependency in your Gemfile so Bundler can find it.

Note: AWS SDK Core requires Ruby 1.9.3+.

Configuration

To use the Ruby SDK, you must configure a region and your AWS account access credentials.

Region

You can export a default region to ENV:

export AWS_REGION='us-west-2'

Or you can configure a region in code:

# default regionAws.config[:region]='us-west-2'# per-service :regions3=Aws::S3::Client.new(region:'us-east-1')

Credentials

Please take care to never commit credentials to source control. We strongly recommended loading credentials from an external source. By default, the Ruby SDK will attempt to load credentials from the following sources:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • The shared credentials ini file at HOME/.aws/credentials
  • From an instance profile when running on EC2

Alternatively, you can specify your credentials directly using one of the following credential classes:

  • Aws::Credentials
  • Aws::SharedCredentials
  • Aws::InstanceProfileCredentials
# default credentialsAws.config[:credentials]=Aws::SharedCredentials.new(profile_name:'myprofile')# per-service :credentialss3=Aws::S3::Client.new(credentials: Aws::SharedCredentials.new(profile_name:'myprofile')

Basic Usage

To make a request, you need to construct a service client.

s3=Aws::S3::Client.new

Each client provides one method per API operation. Refer to the API documentation for a complete list of available methods.

# get a list of buckets in Amazon S3resp=s3.list_bucketsputsresp.buckets.map(&:name)

API methods accept a request params as a hash, and return structured responses.

resp=s3.list_objects(bucket: 'aws-sdk-core',max_keys: 2)resp.contents.eachdo |object|
puts"#{object.key} => #{object.etag}"end

Paging Responses

Many AWS operations limit the number of results returned with each response. A simple paging interface is provided that works with every AWS request.

# yields once per response, even works with non-paged requestss3.list_objects(bucket:'aws-sdk').eachdo |resp|
putsresp.contents.map(&:key)end

If you prefer to control paging yourself, all returned responses have the same helper methods:

# make a request that returns a truncated responseresp=s3.list_objects(bucket:'aws-sdk')resp.last_page?#=> falseresp.next_page?#=> trueresp=resp.next_page# send a request for the next response pageresp=resp.next_pageuntilresp.last_page?

Interactive Console

AWS SDK Core ships with a REPL that acts as an interactive console. You can access the REPL by running aws.rb from the command line.

$ aws.rbAws> ec2.describe_instances.reservations.first.instances.first
<structinstance_id="i-1234567",image_id="ami-7654321",state=<structcode=16,name="running">,
...>

Call #service_classes to get a list of available service helpers and the class they construct.

Aws> service_clients{:autoscaling=>Aws::AutoScaling::Client,:cloudformation=>Aws::CloudFormation::Client,:cloudfront=>Aws::CloudFront::Client,:cloudsearch=>Aws::CloudSearch::Client,
...
:swf=>Aws::SWF::Client}

Versioning

This project uses semantic versioning. When the project leaves the developer preview state, we will continue by versioning from 2.0. Until then, all versions will be suffixed by a release candidate version.

Supported Services

Service NameService ClassAPI Versions
Amazon CloudFrontCloudFront2014-05-31
Amazon CloudSearchCloudSearch2013-01-01
Amazon CloudSearch DomainCloudSearchDomain2013-01-01
Amazon CloudWatchCloudWatch2010-08-01
Amazon CloudWatch LogsCloudWatchLogs2014-03-28
Amazon Cognito IdentityCognitoIdentity2014-06-30
Amazon Cognito SyncCognitoSync2014-06-30
Amazon DynamoDBDynamoDB2012-08-10
Amazon Elastic Compute CloudEC22014-06-15
Amazon Elastic MapReduceEMR2009-03-31
Amazon Elastic TranscoderElasticTranscoder2012-09-25
Amazon ElastiCacheElastiCache2014-07-15
Amazon GlacierGlacier2012-06-01
Amazon KinesisKinesis2013-12-02
Amazon RedshiftRedshift2012-12-01
Amazon Relational Database ServiceRDS2013-09-09
Amazon Route 53Route532013-04-01
Amazon Route 53 DomainsRoute53Domains2014-05-15
Amazon Simple Email ServiceSES2010-12-01
Amazon Simple Notification ServiceSNS2010-03-31
Amazon Simple Queue ServiceSQS2012-11-05
Amazon Simple Storage ServiceS32006-03-01
Amazon Simple Workflow ServiceSWF2012-01-25
Amazon SimpleDBSimpleDB2009-04-15
Auto ScalingAutoScaling2011-01-01
AWS CloudFormationCloudFormation2010-05-15
AWS CloudTrailCloudTrail2013-11-01
AWS Data PipelineDataPipeline2012-10-29
AWS Direct ConnectDirectConnect2012-10-25
AWS Elastic BeanstalkElasticBeanstalk2010-12-01
AWS Identity and Access ManagementIAM2010-05-08
AWS Import/ExportImportExport2010-06-01
AWS OpsWorksOpsWorks2013-02-18
AWS Security Token ServiceSTS2011-06-15
AWS Storage GatewayStorageGateway2013-06-30
AWS SupportSupport2013-04-15
Elastic Load BalancingElasticLoadBalancing2012-06-01

License

This library is distributed under the apache license, version 2.0

copyright 2013. amazon web services, inc. all rights reserved.
licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at
http://www.apache.org/licenses/license-2.0
unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.

About

The core functionality of the AWS SDK for Ruby V2

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
This repository was archived by the owner on Oct 29, 2022. It is now read-only.

Repository files navigation

AWS SDK Core Build StatusCode ClimateCoverage Status

This library is in a developer preview period.

We are working on version 2 of the official AWS SDK for Ruby. This library is the first part of our v2 strategy. AWS SDK Core is an updated set of service clients. Our goal is to make them more flexible and extensible than the clients in version 1 of the Ruby SDK.

For version 1.0 of the Ruby SDK, see aws/aws-sdk-ruby.

Upgrade Notes

During the preview period, there have been some minor backwards incompatible updates between release candidates. These changes are summarized below.

2.0.0.rc15 Upgrading Notes

RC15 updates the Aws::DynamoDB::Client API operations to accept and return simple attribute values. Prior to rc14 values were specified as:

{ s: 'string-value' }
{ n: "5.0" }

This update applies a plugin that allows users to specify values using simple Ruby types, such as Integer, Float, Set, String, etc.

"string-value"
5.0

This affects every DynamoDB request and response structure that accepts or returns an attribute value. To revert to the older format, disable simple attributes:

# disable this new default behavior
Aws::DynamoDB::Client.new(simple_attributes: false)

Please Note - RC15 may be the final release candidate version prior to a 2.0.0 final release of aws-sdk-core.

2.0.0.rc14 Upgrading Notes

RC14 simplifies the API versioning strategy. This may require small changes for users that use the API version locking options. Also, there are minor changes when configuring raw endpoints.

  • Versioned client classes removed, e.g. Aws::S3::Client::V20060301.new should be replaced with Aws::S3::Client.new The :api_version constructor option is no longer accepted.

  • Aws helper methods for client construction deprecated; For example, calling Aws.s3 will generate a deprecation warning. Call Aws::S3::Client.new instead. Top-level helpers will be removed as of v2.0.0 final.

  • When configuring an :endpoint directly, you must now specify the HTTP scheme, e.g. "http://localhost:3000", instead of "localhost:3000". Please note, this should only be done for testing. Normally you only need to configure a :region.

2.0.0.rc11 Upgrading Notes

RC 11 requires a few minor updates. These should be the final public-facing changes before 2.0.0 final.

  • The prefered constructor for services is now using the client class, example:

    # deprecated, will be removed for 2.0.0 final
    Aws::S3.new
    # preferred
    Aws::S3::Client.new
    
  • The :raw_json option for JSON protocol based services has been renamed to :simple_json

  • The short name for Aws::SimpleDB has been renamed from sdb to simpledb.

Links of Interest

Installation

You can install the AWS SDK Core from rubygems:

gem install aws-sdk-core --pre

If you are using Bundler, we recommend that you express a major version dependency (this library uses semantic versioning):

gem 'aws-sdk-core', '~> 2.0'

Until the final release becomes available on Rubygems, leave off the version dependency in your Gemfile so Bundler can find it.

Note: AWS SDK Core requires Ruby 1.9.3+.

Configuration

To use the Ruby SDK, you must configure a region and your AWS account access credentials.

Region

You can export a default region to ENV:

export AWS_REGION='us-west-2'

Or you can configure a region in code:

# default regionAws.config[:region]='us-west-2'# per-service :regions3=Aws::S3::Client.new(region:'us-east-1')

Credentials

Please take care to never commit credentials to source control. We strongly recommended loading credentials from an external source. By default, the Ruby SDK will attempt to load credentials from the following sources:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • The shared credentials ini file at HOME/.aws/credentials
  • From an instance profile when running on EC2

Alternatively, you can specify your credentials directly using one of the following credential classes:

  • Aws::Credentials
  • Aws::SharedCredentials
  • Aws::InstanceProfileCredentials
# default credentialsAws.config[:credentials]=Aws::SharedCredentials.new(profile_name:'myprofile')# per-service :credentialss3=Aws::S3::Client.new(credentials: Aws::SharedCredentials.new(profile_name:'myprofile')

Basic Usage

To make a request, you need to construct a service client.

s3=Aws::S3::Client.new

Each client provides one method per API operation. Refer to the API documentation for a complete list of available methods.

# get a list of buckets in Amazon S3resp=s3.list_bucketsputsresp.buckets.map(&:name)

API methods accept a request params as a hash, and return structured responses.

resp=s3.list_objects(bucket: 'aws-sdk-core',max_keys: 2)resp.contents.eachdo |object|
puts"#{object.key} => #{object.etag}"end

Paging Responses

Many AWS operations limit the number of results returned with each response. A simple paging interface is provided that works with every AWS request.

# yields once per response, even works with non-paged requestss3.list_objects(bucket:'aws-sdk').eachdo |resp|
putsresp.contents.map(&:key)end

If you prefer to control paging yourself, all returned responses have the same helper methods:

# make a request that returns a truncated responseresp=s3.list_objects(bucket:'aws-sdk')resp.last_page?#=> falseresp.next_page?#=> trueresp=resp.next_page# send a request for the next response pageresp=resp.next_pageuntilresp.last_page?

Interactive Console

AWS SDK Core ships with a REPL that acts as an interactive console. You can access the REPL by running aws.rb from the command line.

$ aws.rbAws> ec2.describe_instances.reservations.first.instances.first
<structinstance_id="i-1234567",image_id="ami-7654321",state=<structcode=16,name="running">,
...>

Call #service_classes to get a list of available service helpers and the class they construct.

Aws> service_clients{:autoscaling=>Aws::AutoScaling::Client,:cloudformation=>Aws::CloudFormation::Client,:cloudfront=>Aws::CloudFront::Client,:cloudsearch=>Aws::CloudSearch::Client,
...
:swf=>Aws::SWF::Client}

Versioning

This project uses semantic versioning. When the project leaves the developer preview state, we will continue by versioning from 2.0. Until then, all versions will be suffixed by a release candidate version.

Supported Services

Service NameService ClassAPI Versions
Amazon CloudFrontCloudFront2014-05-31
Amazon CloudSearchCloudSearch2013-01-01
Amazon CloudSearch DomainCloudSearchDomain2013-01-01
Amazon CloudWatchCloudWatch2010-08-01
Amazon CloudWatch LogsCloudWatchLogs2014-03-28
Amazon Cognito IdentityCognitoIdentity2014-06-30
Amazon Cognito SyncCognitoSync2014-06-30
Amazon DynamoDBDynamoDB2012-08-10
Amazon Elastic Compute CloudEC22014-06-15
Amazon Elastic MapReduceEMR2009-03-31
Amazon Elastic TranscoderElasticTranscoder2012-09-25
Amazon ElastiCacheElastiCache2014-07-15
Amazon GlacierGlacier2012-06-01
Amazon KinesisKinesis2013-12-02
Amazon RedshiftRedshift2012-12-01
Amazon Relational Database ServiceRDS2013-09-09
Amazon Route 53Route532013-04-01
Amazon Route 53 DomainsRoute53Domains2014-05-15
Amazon Simple Email ServiceSES2010-12-01
Amazon Simple Notification ServiceSNS2010-03-31
Amazon Simple Queue ServiceSQS2012-11-05
Amazon Simple Storage ServiceS32006-03-01
Amazon Simple Workflow ServiceSWF2012-01-25
Amazon SimpleDBSimpleDB2009-04-15
Auto ScalingAutoScaling2011-01-01
AWS CloudFormationCloudFormation2010-05-15
AWS CloudTrailCloudTrail2013-11-01
AWS Data PipelineDataPipeline2012-10-29
AWS Direct ConnectDirectConnect2012-10-25
AWS Elastic BeanstalkElasticBeanstalk2010-12-01
AWS Identity and Access ManagementIAM2010-05-08
AWS Import/ExportImportExport2010-06-01
AWS OpsWorksOpsWorks2013-02-18
AWS Security Token ServiceSTS2011-06-15
AWS Storage GatewayStorageGateway2013-06-30
AWS SupportSupport2013-04-15
Elastic Load BalancingElasticLoadBalancing2012-06-01

License

This library is distributed under the apache license, version 2.0

copyright 2013. amazon web services, inc. all rights reserved.
licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at
http://www.apache.org/licenses/license-2.0
unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.

About

The core functionality of the AWS SDK for Ruby V2

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
This repository was archived by the owner on Oct 29, 2022. It is now read-only.

Repository files navigation

AWS SDK Core Build StatusCode ClimateCoverage Status

This library is in a developer preview period.

We are working on version 2 of the official AWS SDK for Ruby. This library is the first part of our v2 strategy. AWS SDK Core is an updated set of service clients. Our goal is to make them more flexible and extensible than the clients in version 1 of the Ruby SDK.

For version 1.0 of the Ruby SDK, see aws/aws-sdk-ruby.

Upgrade Notes

During the preview period, there have been some minor backwards incompatible updates between release candidates. These changes are summarized below.

2.0.0.rc15 Upgrading Notes

RC15 updates the Aws::DynamoDB::Client API operations to accept and return simple attribute values. Prior to rc14 values were specified as:

{ s: 'string-value' }
{ n: "5.0" }

This update applies a plugin that allows users to specify values using simple Ruby types, such as Integer, Float, Set, String, etc.

"string-value"
5.0

This affects every DynamoDB request and response structure that accepts or returns an attribute value. To revert to the older format, disable simple attributes:

# disable this new default behavior
Aws::DynamoDB::Client.new(simple_attributes: false)

Please Note - RC15 may be the final release candidate version prior to a 2.0.0 final release of aws-sdk-core.

2.0.0.rc14 Upgrading Notes

RC14 simplifies the API versioning strategy. This may require small changes for users that use the API version locking options. Also, there are minor changes when configuring raw endpoints.

  • Versioned client classes removed, e.g. Aws::S3::Client::V20060301.new should be replaced with Aws::S3::Client.new The :api_version constructor option is no longer accepted.

  • Aws helper methods for client construction deprecated; For example, calling Aws.s3 will generate a deprecation warning. Call Aws::S3::Client.new instead. Top-level helpers will be removed as of v2.0.0 final.

  • When configuring an :endpoint directly, you must now specify the HTTP scheme, e.g. "http://localhost:3000", instead of "localhost:3000". Please note, this should only be done for testing. Normally you only need to configure a :region.

2.0.0.rc11 Upgrading Notes

RC 11 requires a few minor updates. These should be the final public-facing changes before 2.0.0 final.

  • The prefered constructor for services is now using the client class, example:

    # deprecated, will be removed for 2.0.0 final
    Aws::S3.new
    # preferred
    Aws::S3::Client.new
    
  • The :raw_json option for JSON protocol based services has been renamed to :simple_json

  • The short name for Aws::SimpleDB has been renamed from sdb to simpledb.

Links of Interest

Installation

You can install the AWS SDK Core from rubygems:

gem install aws-sdk-core --pre

If you are using Bundler, we recommend that you express a major version dependency (this library uses semantic versioning):

gem 'aws-sdk-core', '~> 2.0'

Until the final release becomes available on Rubygems, leave off the version dependency in your Gemfile so Bundler can find it.

Note: AWS SDK Core requires Ruby 1.9.3+.

Configuration

To use the Ruby SDK, you must configure a region and your AWS account access credentials.

Region

You can export a default region to ENV:

export AWS_REGION='us-west-2'

Or you can configure a region in code:

# default regionAws.config[:region]='us-west-2'# per-service :regions3=Aws::S3::Client.new(region:'us-east-1')

Credentials

Please take care to never commit credentials to source control. We strongly recommended loading credentials from an external source. By default, the Ruby SDK will attempt to load credentials from the following sources:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • The shared credentials ini file at HOME/.aws/credentials
  • From an instance profile when running on EC2

Alternatively, you can specify your credentials directly using one of the following credential classes:

  • Aws::Credentials
  • Aws::SharedCredentials
  • Aws::InstanceProfileCredentials
# default credentialsAws.config[:credentials]=Aws::SharedCredentials.new(profile_name:'myprofile')# per-service :credentialss3=Aws::S3::Client.new(credentials: Aws::SharedCredentials.new(profile_name:'myprofile')

Basic Usage

To make a request, you need to construct a service client.

s3=Aws::S3::Client.new

Each client provides one method per API operation. Refer to the API documentation for a complete list of available methods.

# get a list of buckets in Amazon S3resp=s3.list_bucketsputsresp.buckets.map(&:name)

API methods accept a request params as a hash, and return structured responses.

resp=s3.list_objects(bucket: 'aws-sdk-core',max_keys: 2)resp.contents.eachdo |object|
puts"#{object.key} => #{object.etag}"end

Paging Responses

Many AWS operations limit the number of results returned with each response. A simple paging interface is provided that works with every AWS request.

# yields once per response, even works with non-paged requestss3.list_objects(bucket:'aws-sdk').eachdo |resp|
putsresp.contents.map(&:key)end

If you prefer to control paging yourself, all returned responses have the same helper methods:

# make a request that returns a truncated responseresp=s3.list_objects(bucket:'aws-sdk')resp.last_page?#=> falseresp.next_page?#=> trueresp=resp.next_page# send a request for the next response pageresp=resp.next_pageuntilresp.last_page?

Interactive Console

AWS SDK Core ships with a REPL that acts as an interactive console. You can access the REPL by running aws.rb from the command line.

$ aws.rbAws> ec2.describe_instances.reservations.first.instances.first
<structinstance_id="i-1234567",image_id="ami-7654321",state=<structcode=16,name="running">,
...>

Call #service_classes to get a list of available service helpers and the class they construct.

Aws> service_clients{:autoscaling=>Aws::AutoScaling::Client,:cloudformation=>Aws::CloudFormation::Client,:cloudfront=>Aws::CloudFront::Client,:cloudsearch=>Aws::CloudSearch::Client,
...
:swf=>Aws::SWF::Client}

Versioning

This project uses semantic versioning. When the project leaves the developer preview state, we will continue by versioning from 2.0. Until then, all versions will be suffixed by a release candidate version.

Supported Services

Service NameService ClassAPI Versions
Amazon CloudFrontCloudFront2014-05-31
Amazon CloudSearchCloudSearch2013-01-01
Amazon CloudSearch DomainCloudSearchDomain2013-01-01
Amazon CloudWatchCloudWatch2010-08-01
Amazon CloudWatch LogsCloudWatchLogs2014-03-28
Amazon Cognito IdentityCognitoIdentity2014-06-30
Amazon Cognito SyncCognitoSync2014-06-30
Amazon DynamoDBDynamoDB2012-08-10
Amazon Elastic Compute CloudEC22014-06-15
Amazon Elastic MapReduceEMR2009-03-31
Amazon Elastic TranscoderElasticTranscoder2012-09-25
Amazon ElastiCacheElastiCache2014-07-15
Amazon GlacierGlacier2012-06-01
Amazon KinesisKinesis2013-12-02
Amazon RedshiftRedshift2012-12-01
Amazon Relational Database ServiceRDS2013-09-09
Amazon Route 53Route532013-04-01
Amazon Route 53 DomainsRoute53Domains2014-05-15
Amazon Simple Email ServiceSES2010-12-01
Amazon Simple Notification ServiceSNS2010-03-31
Amazon Simple Queue ServiceSQS2012-11-05
Amazon Simple Storage ServiceS32006-03-01
Amazon Simple Workflow ServiceSWF2012-01-25
Amazon SimpleDBSimpleDB2009-04-15
Auto ScalingAutoScaling2011-01-01
AWS CloudFormationCloudFormation2010-05-15
AWS CloudTrailCloudTrail2013-11-01
AWS Data PipelineDataPipeline2012-10-29
AWS Direct ConnectDirectConnect2012-10-25
AWS Elastic BeanstalkElasticBeanstalk2010-12-01
AWS Identity and Access ManagementIAM2010-05-08
AWS Import/ExportImportExport2010-06-01
AWS OpsWorksOpsWorks2013-02-18
AWS Security Token ServiceSTS2011-06-15
AWS Storage GatewayStorageGateway2013-06-30
AWS SupportSupport2013-04-15
Elastic Load BalancingElasticLoadBalancing2012-06-01

License

This library is distributed under the apache license, version 2.0

copyright 2013. amazon web services, inc. all rights reserved.
licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at
http://www.apache.org/licenses/license-2.0
unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.

About

The core functionality of the AWS SDK for Ruby V2

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
This repository was archived by the owner on Oct 29, 2022. It is now read-only.

Repository files navigation

AWS SDK Core Build StatusCode ClimateCoverage Status

This library is in a developer preview period.

We are working on version 2 of the official AWS SDK for Ruby. This library is the first part of our v2 strategy. AWS SDK Core is an updated set of service clients. Our goal is to make them more flexible and extensible than the clients in version 1 of the Ruby SDK.

For version 1.0 of the Ruby SDK, see aws/aws-sdk-ruby.

Upgrade Notes

During the preview period, there have been some minor backwards incompatible updates between release candidates. These changes are summarized below.

2.0.0.rc15 Upgrading Notes

RC15 updates the Aws::DynamoDB::Client API operations to accept and return simple attribute values. Prior to rc14 values were specified as:

{ s: 'string-value' }
{ n: "5.0" }

This update applies a plugin that allows users to specify values using simple Ruby types, such as Integer, Float, Set, String, etc.

"string-value"
5.0

This affects every DynamoDB request and response structure that accepts or returns an attribute value. To revert to the older format, disable simple attributes:

# disable this new default behavior
Aws::DynamoDB::Client.new(simple_attributes: false)

Please Note - RC15 may be the final release candidate version prior to a 2.0.0 final release of aws-sdk-core.

2.0.0.rc14 Upgrading Notes

RC14 simplifies the API versioning strategy. This may require small changes for users that use the API version locking options. Also, there are minor changes when configuring raw endpoints.

  • Versioned client classes removed, e.g. Aws::S3::Client::V20060301.new should be replaced with Aws::S3::Client.new The :api_version constructor option is no longer accepted.

  • Aws helper methods for client construction deprecated; For example, calling Aws.s3 will generate a deprecation warning. Call Aws::S3::Client.new instead. Top-level helpers will be removed as of v2.0.0 final.

  • When configuring an :endpoint directly, you must now specify the HTTP scheme, e.g. "http://localhost:3000", instead of "localhost:3000". Please note, this should only be done for testing. Normally you only need to configure a :region.

2.0.0.rc11 Upgrading Notes

RC 11 requires a few minor updates. These should be the final public-facing changes before 2.0.0 final.

  • The prefered constructor for services is now using the client class, example:

    # deprecated, will be removed for 2.0.0 final
    Aws::S3.new
    # preferred
    Aws::S3::Client.new
    
  • The :raw_json option for JSON protocol based services has been renamed to :simple_json

  • The short name for Aws::SimpleDB has been renamed from sdb to simpledb.

Links of Interest

Installation

You can install the AWS SDK Core from rubygems:

gem install aws-sdk-core --pre

If you are using Bundler, we recommend that you express a major version dependency (this library uses semantic versioning):

gem 'aws-sdk-core', '~> 2.0'

Until the final release becomes available on Rubygems, leave off the version dependency in your Gemfile so Bundler can find it.

Note: AWS SDK Core requires Ruby 1.9.3+.

Configuration

To use the Ruby SDK, you must configure a region and your AWS account access credentials.

Region

You can export a default region to ENV:

export AWS_REGION='us-west-2'

Or you can configure a region in code:

# default regionAws.config[:region]='us-west-2'# per-service :regions3=Aws::S3::Client.new(region:'us-east-1')

Credentials

Please take care to never commit credentials to source control. We strongly recommended loading credentials from an external source. By default, the Ruby SDK will attempt to load credentials from the following sources:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • The shared credentials ini file at HOME/.aws/credentials
  • From an instance profile when running on EC2

Alternatively, you can specify your credentials directly using one of the following credential classes:

  • Aws::Credentials
  • Aws::SharedCredentials
  • Aws::InstanceProfileCredentials
# default credentialsAws.config[:credentials]=Aws::SharedCredentials.new(profile_name:'myprofile')# per-service :credentialss3=Aws::S3::Client.new(credentials: Aws::SharedCredentials.new(profile_name:'myprofile')

Basic Usage

To make a request, you need to construct a service client.

s3=Aws::S3::Client.new

Each client provides one method per API operation. Refer to the API documentation for a complete list of available methods.

# get a list of buckets in Amazon S3resp=s3.list_bucketsputsresp.buckets.map(&:name)

API methods accept a request params as a hash, and return structured responses.

resp=s3.list_objects(bucket: 'aws-sdk-core',max_keys: 2)resp.contents.eachdo |object|
puts"#{object.key} => #{object.etag}"end

Paging Responses

Many AWS operations limit the number of results returned with each response. A simple paging interface is provided that works with every AWS request.

# yields once per response, even works with non-paged requestss3.list_objects(bucket:'aws-sdk').eachdo |resp|
putsresp.contents.map(&:key)end

If you prefer to control paging yourself, all returned responses have the same helper methods:

# make a request that returns a truncated responseresp=s3.list_objects(bucket:'aws-sdk')resp.last_page?#=> falseresp.next_page?#=> trueresp=resp.next_page# send a request for the next response pageresp=resp.next_pageuntilresp.last_page?

Interactive Console

AWS SDK Core ships with a REPL that acts as an interactive console. You can access the REPL by running aws.rb from the command line.

$ aws.rbAws> ec2.describe_instances.reservations.first.instances.first
<structinstance_id="i-1234567",image_id="ami-7654321",state=<structcode=16,name="running">,
...>

Call #service_classes to get a list of available service helpers and the class they construct.

Aws> service_clients{:autoscaling=>Aws::AutoScaling::Client,:cloudformation=>Aws::CloudFormation::Client,:cloudfront=>Aws::CloudFront::Client,:cloudsearch=>Aws::CloudSearch::Client,
...
:swf=>Aws::SWF::Client}

Versioning

This project uses semantic versioning. When the project leaves the developer preview state, we will continue by versioning from 2.0. Until then, all versions will be suffixed by a release candidate version.

Supported Services

Service NameService ClassAPI Versions
Amazon CloudFrontCloudFront2014-05-31
Amazon CloudSearchCloudSearch2013-01-01
Amazon CloudSearch DomainCloudSearchDomain2013-01-01
Amazon CloudWatchCloudWatch2010-08-01
Amazon CloudWatch LogsCloudWatchLogs2014-03-28
Amazon Cognito IdentityCognitoIdentity2014-06-30
Amazon Cognito SyncCognitoSync2014-06-30
Amazon DynamoDBDynamoDB2012-08-10
Amazon Elastic Compute CloudEC22014-06-15
Amazon Elastic MapReduceEMR2009-03-31
Amazon Elastic TranscoderElasticTranscoder2012-09-25
Amazon ElastiCacheElastiCache2014-07-15
Amazon GlacierGlacier2012-06-01
Amazon KinesisKinesis2013-12-02
Amazon RedshiftRedshift2012-12-01
Amazon Relational Database ServiceRDS2013-09-09
Amazon Route 53Route532013-04-01
Amazon Route 53 DomainsRoute53Domains2014-05-15
Amazon Simple Email ServiceSES2010-12-01
Amazon Simple Notification ServiceSNS2010-03-31
Amazon Simple Queue ServiceSQS2012-11-05
Amazon Simple Storage ServiceS32006-03-01
Amazon Simple Workflow ServiceSWF2012-01-25
Amazon SimpleDBSimpleDB2009-04-15
Auto ScalingAutoScaling2011-01-01
AWS CloudFormationCloudFormation2010-05-15
AWS CloudTrailCloudTrail2013-11-01
AWS Data PipelineDataPipeline2012-10-29
AWS Direct ConnectDirectConnect2012-10-25
AWS Elastic BeanstalkElasticBeanstalk2010-12-01
AWS Identity and Access ManagementIAM2010-05-08
AWS Import/ExportImportExport2010-06-01
AWS OpsWorksOpsWorks2013-02-18
AWS Security Token ServiceSTS2011-06-15
AWS Storage GatewayStorageGateway2013-06-30
AWS SupportSupport2013-04-15
Elastic Load BalancingElasticLoadBalancing2012-06-01

License

This library is distributed under the apache license, version 2.0

copyright 2013. amazon web services, inc. all rights reserved.
licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at
http://www.apache.org/licenses/license-2.0
unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.

About

The core functionality of the AWS SDK for Ruby V2

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
This repository was archived by the owner on Oct 29, 2022. It is now read-only.

Repository files navigation

AWS SDK Core Build StatusCode ClimateCoverage Status

This library is in a developer preview period.

We are working on version 2 of the official AWS SDK for Ruby. This library is the first part of our v2 strategy. AWS SDK Core is an updated set of service clients. Our goal is to make them more flexible and extensible than the clients in version 1 of the Ruby SDK.

For version 1.0 of the Ruby SDK, see aws/aws-sdk-ruby.

Upgrade Notes

During the preview period, there have been some minor backwards incompatible updates between release candidates. These changes are summarized below.

2.0.0.rc15 Upgrading Notes

RC15 updates the Aws::DynamoDB::Client API operations to accept and return simple attribute values. Prior to rc14 values were specified as:

{ s: 'string-value' }
{ n: "5.0" }

This update applies a plugin that allows users to specify values using simple Ruby types, such as Integer, Float, Set, String, etc.

"string-value"
5.0

This affects every DynamoDB request and response structure that accepts or returns an attribute value. To revert to the older format, disable simple attributes:

# disable this new default behavior
Aws::DynamoDB::Client.new(simple_attributes: false)

Please Note - RC15 may be the final release candidate version prior to a 2.0.0 final release of aws-sdk-core.

2.0.0.rc14 Upgrading Notes

RC14 simplifies the API versioning strategy. This may require small changes for users that use the API version locking options. Also, there are minor changes when configuring raw endpoints.

  • Versioned client classes removed, e.g. Aws::S3::Client::V20060301.new should be replaced with Aws::S3::Client.new The :api_version constructor option is no longer accepted.

  • Aws helper methods for client construction deprecated; For example, calling Aws.s3 will generate a deprecation warning. Call Aws::S3::Client.new instead. Top-level helpers will be removed as of v2.0.0 final.

  • When configuring an :endpoint directly, you must now specify the HTTP scheme, e.g. "http://localhost:3000", instead of "localhost:3000". Please note, this should only be done for testing. Normally you only need to configure a :region.

2.0.0.rc11 Upgrading Notes

RC 11 requires a few minor updates. These should be the final public-facing changes before 2.0.0 final.

  • The prefered constructor for services is now using the client class, example:

    # deprecated, will be removed for 2.0.0 final
    Aws::S3.new
    # preferred
    Aws::S3::Client.new
    
  • The :raw_json option for JSON protocol based services has been renamed to :simple_json

  • The short name for Aws::SimpleDB has been renamed from sdb to simpledb.

Links of Interest

Installation

You can install the AWS SDK Core from rubygems:

gem install aws-sdk-core --pre

If you are using Bundler, we recommend that you express a major version dependency (this library uses semantic versioning):

gem 'aws-sdk-core', '~> 2.0'

Until the final release becomes available on Rubygems, leave off the version dependency in your Gemfile so Bundler can find it.

Note: AWS SDK Core requires Ruby 1.9.3+.

Configuration

To use the Ruby SDK, you must configure a region and your AWS account access credentials.

Region

You can export a default region to ENV:

export AWS_REGION='us-west-2'

Or you can configure a region in code:

# default regionAws.config[:region]='us-west-2'# per-service :regions3=Aws::S3::Client.new(region:'us-east-1')

Credentials

Please take care to never commit credentials to source control. We strongly recommended loading credentials from an external source. By default, the Ruby SDK will attempt to load credentials from the following sources:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • The shared credentials ini file at HOME/.aws/credentials
  • From an instance profile when running on EC2

Alternatively, you can specify your credentials directly using one of the following credential classes:

  • Aws::Credentials
  • Aws::SharedCredentials
  • Aws::InstanceProfileCredentials
# default credentialsAws.config[:credentials]=Aws::SharedCredentials.new(profile_name:'myprofile')# per-service :credentialss3=Aws::S3::Client.new(credentials: Aws::SharedCredentials.new(profile_name:'myprofile')

Basic Usage

To make a request, you need to construct a service client.

s3=Aws::S3::Client.new

Each client provides one method per API operation. Refer to the API documentation for a complete list of available methods.

# get a list of buckets in Amazon S3resp=s3.list_bucketsputsresp.buckets.map(&:name)

API methods accept a request params as a hash, and return structured responses.

resp=s3.list_objects(bucket: 'aws-sdk-core',max_keys: 2)resp.contents.eachdo |object|
puts"#{object.key} => #{object.etag}"end

Paging Responses

Many AWS operations limit the number of results returned with each response. A simple paging interface is provided that works with every AWS request.

# yields once per response, even works with non-paged requestss3.list_objects(bucket:'aws-sdk').eachdo |resp|
putsresp.contents.map(&:key)end

If you prefer to control paging yourself, all returned responses have the same helper methods:

# make a request that returns a truncated responseresp=s3.list_objects(bucket:'aws-sdk')resp.last_page?#=> falseresp.next_page?#=> trueresp=resp.next_page# send a request for the next response pageresp=resp.next_pageuntilresp.last_page?

Interactive Console

AWS SDK Core ships with a REPL that acts as an interactive console. You can access the REPL by running aws.rb from the command line.

$ aws.rbAws> ec2.describe_instances.reservations.first.instances.first
<structinstance_id="i-1234567",image_id="ami-7654321",state=<structcode=16,name="running">,
...>

Call #service_classes to get a list of available service helpers and the class they construct.

Aws> service_clients{:autoscaling=>Aws::AutoScaling::Client,:cloudformation=>Aws::CloudFormation::Client,:cloudfront=>Aws::CloudFront::Client,:cloudsearch=>Aws::CloudSearch::Client,
...
:swf=>Aws::SWF::Client}

Versioning

This project uses semantic versioning. When the project leaves the developer preview state, we will continue by versioning from 2.0. Until then, all versions will be suffixed by a release candidate version.

Supported Services

Service NameService ClassAPI Versions
Amazon CloudFrontCloudFront2014-05-31
Amazon CloudSearchCloudSearch2013-01-01
Amazon CloudSearch DomainCloudSearchDomain2013-01-01
Amazon CloudWatchCloudWatch2010-08-01
Amazon CloudWatch LogsCloudWatchLogs2014-03-28
Amazon Cognito IdentityCognitoIdentity2014-06-30
Amazon Cognito SyncCognitoSync2014-06-30
Amazon DynamoDBDynamoDB2012-08-10
Amazon Elastic Compute CloudEC22014-06-15
Amazon Elastic MapReduceEMR2009-03-31
Amazon Elastic TranscoderElasticTranscoder2012-09-25
Amazon ElastiCacheElastiCache2014-07-15
Amazon GlacierGlacier2012-06-01
Amazon KinesisKinesis2013-12-02
Amazon RedshiftRedshift2012-12-01
Amazon Relational Database ServiceRDS2013-09-09
Amazon Route 53Route532013-04-01
Amazon Route 53 DomainsRoute53Domains2014-05-15
Amazon Simple Email ServiceSES2010-12-01
Amazon Simple Notification ServiceSNS2010-03-31
Amazon Simple Queue ServiceSQS2012-11-05
Amazon Simple Storage ServiceS32006-03-01
Amazon Simple Workflow ServiceSWF2012-01-25
Amazon SimpleDBSimpleDB2009-04-15
Auto ScalingAutoScaling2011-01-01
AWS CloudFormationCloudFormation2010-05-15
AWS CloudTrailCloudTrail2013-11-01
AWS Data PipelineDataPipeline2012-10-29
AWS Direct ConnectDirectConnect2012-10-25
AWS Elastic BeanstalkElasticBeanstalk2010-12-01
AWS Identity and Access ManagementIAM2010-05-08
AWS Import/ExportImportExport2010-06-01
AWS OpsWorksOpsWorks2013-02-18
AWS Security Token ServiceSTS2011-06-15
AWS Storage GatewayStorageGateway2013-06-30
AWS SupportSupport2013-04-15
Elastic Load BalancingElasticLoadBalancing2012-06-01

License

This library is distributed under the apache license, version 2.0

copyright 2013. amazon web services, inc. all rights reserved.
licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at
http://www.apache.org/licenses/license-2.0
unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.

About

The core functionality of the AWS SDK for Ruby V2

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
This repository was archived by the owner on Oct 29, 2022. It is now read-only.

Repository files navigation

AWS SDK Core Build StatusCode ClimateCoverage Status

This library is in a developer preview period.

We are working on version 2 of the official AWS SDK for Ruby. This library is the first part of our v2 strategy. AWS SDK Core is an updated set of service clients. Our goal is to make them more flexible and extensible than the clients in version 1 of the Ruby SDK.

For version 1.0 of the Ruby SDK, see aws/aws-sdk-ruby.

Upgrade Notes

During the preview period, there have been some minor backwards incompatible updates between release candidates. These changes are summarized below.

2.0.0.rc15 Upgrading Notes

RC15 updates the Aws::DynamoDB::Client API operations to accept and return simple attribute values. Prior to rc14 values were specified as:

{ s: 'string-value' }
{ n: "5.0" }

This update applies a plugin that allows users to specify values using simple Ruby types, such as Integer, Float, Set, String, etc.

"string-value"
5.0

This affects every DynamoDB request and response structure that accepts or returns an attribute value. To revert to the older format, disable simple attributes:

# disable this new default behavior
Aws::DynamoDB::Client.new(simple_attributes: false)

Please Note - RC15 may be the final release candidate version prior to a 2.0.0 final release of aws-sdk-core.

2.0.0.rc14 Upgrading Notes

RC14 simplifies the API versioning strategy. This may require small changes for users that use the API version locking options. Also, there are minor changes when configuring raw endpoints.

  • Versioned client classes removed, e.g. Aws::S3::Client::V20060301.new should be replaced with Aws::S3::Client.new The :api_version constructor option is no longer accepted.

  • Aws helper methods for client construction deprecated; For example, calling Aws.s3 will generate a deprecation warning. Call Aws::S3::Client.new instead. Top-level helpers will be removed as of v2.0.0 final.

  • When configuring an :endpoint directly, you must now specify the HTTP scheme, e.g. "http://localhost:3000", instead of "localhost:3000". Please note, this should only be done for testing. Normally you only need to configure a :region.

2.0.0.rc11 Upgrading Notes

RC 11 requires a few minor updates. These should be the final public-facing changes before 2.0.0 final.

  • The prefered constructor for services is now using the client class, example:

    # deprecated, will be removed for 2.0.0 final
    Aws::S3.new
    # preferred
    Aws::S3::Client.new
    
  • The :raw_json option for JSON protocol based services has been renamed to :simple_json

  • The short name for Aws::SimpleDB has been renamed from sdb to simpledb.

Links of Interest

Installation

You can install the AWS SDK Core from rubygems:

gem install aws-sdk-core --pre

If you are using Bundler, we recommend that you express a major version dependency (this library uses semantic versioning):

gem 'aws-sdk-core', '~> 2.0'

Until the final release becomes available on Rubygems, leave off the version dependency in your Gemfile so Bundler can find it.

Note: AWS SDK Core requires Ruby 1.9.3+.

Configuration

To use the Ruby SDK, you must configure a region and your AWS account access credentials.

Region

You can export a default region to ENV:

export AWS_REGION='us-west-2'

Or you can configure a region in code:

# default regionAws.config[:region]='us-west-2'# per-service :regions3=Aws::S3::Client.new(region:'us-east-1')

Credentials

Please take care to never commit credentials to source control. We strongly recommended loading credentials from an external source. By default, the Ruby SDK will attempt to load credentials from the following sources:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • The shared credentials ini file at HOME/.aws/credentials
  • From an instance profile when running on EC2

Alternatively, you can specify your credentials directly using one of the following credential classes:

  • Aws::Credentials
  • Aws::SharedCredentials
  • Aws::InstanceProfileCredentials
# default credentialsAws.config[:credentials]=Aws::SharedCredentials.new(profile_name:'myprofile')# per-service :credentialss3=Aws::S3::Client.new(credentials: Aws::SharedCredentials.new(profile_name:'myprofile')

Basic Usage

To make a request, you need to construct a service client.

s3=Aws::S3::Client.new

Each client provides one method per API operation. Refer to the API documentation for a complete list of available methods.

# get a list of buckets in Amazon S3resp=s3.list_bucketsputsresp.buckets.map(&:name)

API methods accept a request params as a hash, and return structured responses.

resp=s3.list_objects(bucket: 'aws-sdk-core',max_keys: 2)resp.contents.eachdo |object|
puts"#{object.key} => #{object.etag}"end

Paging Responses

Many AWS operations limit the number of results returned with each response. A simple paging interface is provided that works with every AWS request.

# yields once per response, even works with non-paged requestss3.list_objects(bucket:'aws-sdk').eachdo |resp|
putsresp.contents.map(&:key)end

If you prefer to control paging yourself, all returned responses have the same helper methods:

# make a request that returns a truncated responseresp=s3.list_objects(bucket:'aws-sdk')resp.last_page?#=> falseresp.next_page?#=> trueresp=resp.next_page# send a request for the next response pageresp=resp.next_pageuntilresp.last_page?

Interactive Console

AWS SDK Core ships with a REPL that acts as an interactive console. You can access the REPL by running aws.rb from the command line.

$ aws.rbAws> ec2.describe_instances.reservations.first.instances.first
<structinstance_id="i-1234567",image_id="ami-7654321",state=<structcode=16,name="running">,
...>

Call #service_classes to get a list of available service helpers and the class they construct.

Aws> service_clients{:autoscaling=>Aws::AutoScaling::Client,:cloudformation=>Aws::CloudFormation::Client,:cloudfront=>Aws::CloudFront::Client,:cloudsearch=>Aws::CloudSearch::Client,
...
:swf=>Aws::SWF::Client}

Versioning

This project uses semantic versioning. When the project leaves the developer preview state, we will continue by versioning from 2.0. Until then, all versions will be suffixed by a release candidate version.

Supported Services

Service NameService ClassAPI Versions
Amazon CloudFrontCloudFront2014-05-31
Amazon CloudSearchCloudSearch2013-01-01
Amazon CloudSearch DomainCloudSearchDomain2013-01-01
Amazon CloudWatchCloudWatch2010-08-01
Amazon CloudWatch LogsCloudWatchLogs2014-03-28
Amazon Cognito IdentityCognitoIdentity2014-06-30
Amazon Cognito SyncCognitoSync2014-06-30
Amazon DynamoDBDynamoDB2012-08-10
Amazon Elastic Compute CloudEC22014-06-15
Amazon Elastic MapReduceEMR2009-03-31
Amazon Elastic TranscoderElasticTranscoder2012-09-25
Amazon ElastiCacheElastiCache2014-07-15
Amazon GlacierGlacier2012-06-01
Amazon KinesisKinesis2013-12-02
Amazon RedshiftRedshift2012-12-01
Amazon Relational Database ServiceRDS2013-09-09
Amazon Route 53Route532013-04-01
Amazon Route 53 DomainsRoute53Domains2014-05-15
Amazon Simple Email ServiceSES2010-12-01
Amazon Simple Notification ServiceSNS2010-03-31
Amazon Simple Queue ServiceSQS2012-11-05
Amazon Simple Storage ServiceS32006-03-01
Amazon Simple Workflow ServiceSWF2012-01-25
Amazon SimpleDBSimpleDB2009-04-15
Auto ScalingAutoScaling2011-01-01
AWS CloudFormationCloudFormation2010-05-15
AWS CloudTrailCloudTrail2013-11-01
AWS Data PipelineDataPipeline2012-10-29
AWS Direct ConnectDirectConnect2012-10-25
AWS Elastic BeanstalkElasticBeanstalk2010-12-01
AWS Identity and Access ManagementIAM2010-05-08
AWS Import/ExportImportExport2010-06-01
AWS OpsWorksOpsWorks2013-02-18
AWS Security Token ServiceSTS2011-06-15
AWS Storage GatewayStorageGateway2013-06-30
AWS SupportSupport2013-04-15
Elastic Load BalancingElasticLoadBalancing2012-06-01

License

This library is distributed under the apache license, version 2.0

copyright 2013. amazon web services, inc. all rights reserved.
licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at
http://www.apache.org/licenses/license-2.0
unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.

About

The core functionality of the AWS SDK for Ruby V2

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages