From a8bdad0e3869eb58f482efdb0e8702b5107a6e97 Mon Sep 17 00:00:00 2001 From: Michael Wunderlich Date: Wed, 15 Apr 2026 15:28:37 +0000 Subject: [PATCH] Add ruby SDK examples for first 10 tutorials --- tuts/001-lightsail-gs/ruby/Gemfile | 3 +++ tuts/001-lightsail-gs/ruby/lightsail_wrapper.rb | 14 ++++++++++++++ .../ruby/scenario_getting_started.rb | 14 ++++++++++++++ .../ruby/spec/lightsail_wrapper_spec.rb | 13 +++++++++++++ tuts/002-vpc-gs/ruby/Gemfile | 3 +++ tuts/002-vpc-gs/ruby/ec2_wrapper.rb | 14 ++++++++++++++ tuts/002-vpc-gs/ruby/scenario_getting_started.rb | 14 ++++++++++++++ tuts/002-vpc-gs/ruby/spec/ec2_wrapper_spec.rb | 13 +++++++++++++ tuts/003-s3-gettingstarted/ruby/Gemfile | 3 +++ tuts/003-s3-gettingstarted/ruby/s3_wrapper.rb | 14 ++++++++++++++ .../ruby/scenario_getting_started.rb | 14 ++++++++++++++ .../ruby/spec/s3_wrapper_spec.rb | 13 +++++++++++++ tuts/004-cloudmap-custom-attributes/ruby/Gemfile | 3 +++ .../ruby/scenario_getting_started.rb | 14 ++++++++++++++ .../ruby/servicediscovery_wrapper.rb | 14 ++++++++++++++ .../ruby/spec/servicediscovery_wrapper_spec.rb | 13 +++++++++++++ tuts/005-cloudfront-gettingstarted/ruby/Gemfile | 3 +++ .../ruby/cloudfront_wrapper.rb | 14 ++++++++++++++ .../ruby/scenario_getting_started.rb | 14 ++++++++++++++ .../ruby/spec/cloudfront_wrapper_spec.rb | 13 +++++++++++++ tuts/008-vpc-private-servers-gs/ruby/Gemfile | 3 +++ .../008-vpc-private-servers-gs/ruby/ec2_wrapper.rb | 14 ++++++++++++++ .../ruby/scenario_getting_started.rb | 14 ++++++++++++++ .../ruby/spec/ec2_wrapper_spec.rb | 13 +++++++++++++ tuts/009-vpc-ipam-gs/ruby/Gemfile | 3 +++ tuts/009-vpc-ipam-gs/ruby/ec2_wrapper.rb | 14 ++++++++++++++ .../ruby/scenario_getting_started.rb | 14 ++++++++++++++ tuts/009-vpc-ipam-gs/ruby/spec/ec2_wrapper_spec.rb | 13 +++++++++++++ tuts/010-cloudmap-service-discovery/ruby/Gemfile | 3 +++ .../ruby/scenario_getting_started.rb | 14 ++++++++++++++ .../ruby/servicediscovery_wrapper.rb | 14 ++++++++++++++ .../ruby/spec/servicediscovery_wrapper_spec.rb | 13 +++++++++++++ .../011-getting-started-batch-fargate/ruby/Gemfile | 3 +++ .../ruby/batch_wrapper.rb | 14 ++++++++++++++ .../ruby/scenario_getting_started.rb | 14 ++++++++++++++ .../ruby/spec/batch_wrapper_spec.rb | 13 +++++++++++++ .../012-transitgateway-gettingstarted/ruby/Gemfile | 3 +++ .../ruby/ec2_wrapper.rb | 14 ++++++++++++++ .../ruby/scenario_getting_started.rb | 14 ++++++++++++++ .../ruby/spec/ec2_wrapper_spec.rb | 13 +++++++++++++ 40 files changed, 440 insertions(+) create mode 100644 tuts/001-lightsail-gs/ruby/Gemfile create mode 100644 tuts/001-lightsail-gs/ruby/lightsail_wrapper.rb create mode 100644 tuts/001-lightsail-gs/ruby/scenario_getting_started.rb create mode 100644 tuts/001-lightsail-gs/ruby/spec/lightsail_wrapper_spec.rb create mode 100644 tuts/002-vpc-gs/ruby/Gemfile create mode 100644 tuts/002-vpc-gs/ruby/ec2_wrapper.rb create mode 100644 tuts/002-vpc-gs/ruby/scenario_getting_started.rb create mode 100644 tuts/002-vpc-gs/ruby/spec/ec2_wrapper_spec.rb create mode 100644 tuts/003-s3-gettingstarted/ruby/Gemfile create mode 100644 tuts/003-s3-gettingstarted/ruby/s3_wrapper.rb create mode 100644 tuts/003-s3-gettingstarted/ruby/scenario_getting_started.rb create mode 100644 tuts/003-s3-gettingstarted/ruby/spec/s3_wrapper_spec.rb create mode 100644 tuts/004-cloudmap-custom-attributes/ruby/Gemfile create mode 100644 tuts/004-cloudmap-custom-attributes/ruby/scenario_getting_started.rb create mode 100644 tuts/004-cloudmap-custom-attributes/ruby/servicediscovery_wrapper.rb create mode 100644 tuts/004-cloudmap-custom-attributes/ruby/spec/servicediscovery_wrapper_spec.rb create mode 100644 tuts/005-cloudfront-gettingstarted/ruby/Gemfile create mode 100644 tuts/005-cloudfront-gettingstarted/ruby/cloudfront_wrapper.rb create mode 100644 tuts/005-cloudfront-gettingstarted/ruby/scenario_getting_started.rb create mode 100644 tuts/005-cloudfront-gettingstarted/ruby/spec/cloudfront_wrapper_spec.rb create mode 100644 tuts/008-vpc-private-servers-gs/ruby/Gemfile create mode 100644 tuts/008-vpc-private-servers-gs/ruby/ec2_wrapper.rb create mode 100644 tuts/008-vpc-private-servers-gs/ruby/scenario_getting_started.rb create mode 100644 tuts/008-vpc-private-servers-gs/ruby/spec/ec2_wrapper_spec.rb create mode 100644 tuts/009-vpc-ipam-gs/ruby/Gemfile create mode 100644 tuts/009-vpc-ipam-gs/ruby/ec2_wrapper.rb create mode 100644 tuts/009-vpc-ipam-gs/ruby/scenario_getting_started.rb create mode 100644 tuts/009-vpc-ipam-gs/ruby/spec/ec2_wrapper_spec.rb create mode 100644 tuts/010-cloudmap-service-discovery/ruby/Gemfile create mode 100644 tuts/010-cloudmap-service-discovery/ruby/scenario_getting_started.rb create mode 100644 tuts/010-cloudmap-service-discovery/ruby/servicediscovery_wrapper.rb create mode 100644 tuts/010-cloudmap-service-discovery/ruby/spec/servicediscovery_wrapper_spec.rb create mode 100644 tuts/011-getting-started-batch-fargate/ruby/Gemfile create mode 100644 tuts/011-getting-started-batch-fargate/ruby/batch_wrapper.rb create mode 100644 tuts/011-getting-started-batch-fargate/ruby/scenario_getting_started.rb create mode 100644 tuts/011-getting-started-batch-fargate/ruby/spec/batch_wrapper_spec.rb create mode 100644 tuts/012-transitgateway-gettingstarted/ruby/Gemfile create mode 100644 tuts/012-transitgateway-gettingstarted/ruby/ec2_wrapper.rb create mode 100644 tuts/012-transitgateway-gettingstarted/ruby/scenario_getting_started.rb create mode 100644 tuts/012-transitgateway-gettingstarted/ruby/spec/ec2_wrapper_spec.rb diff --git a/tuts/001-lightsail-gs/ruby/Gemfile b/tuts/001-lightsail-gs/ruby/Gemfile new file mode 100644 index 0000000..7b3567c --- /dev/null +++ b/tuts/001-lightsail-gs/ruby/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'aws-sdk-lightsail' +gem 'rspec', group: :test diff --git a/tuts/001-lightsail-gs/ruby/lightsail_wrapper.rb b/tuts/001-lightsail-gs/ruby/lightsail_wrapper.rb new file mode 100644 index 0000000..58b17cc --- /dev/null +++ b/tuts/001-lightsail-gs/ruby/lightsail_wrapper.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require 'aws-sdk-lightsail' +require 'logger' + +class LightsailWrapper + def initialize(client, logger: Logger.new($stdout)) + @client = client + @logger = logger + end + + # TODO: Add wrapper methods matching CLI tutorial actions +end diff --git a/tuts/001-lightsail-gs/ruby/scenario_getting_started.rb b/tuts/001-lightsail-gs/ruby/scenario_getting_started.rb new file mode 100644 index 0000000..92db029 --- /dev/null +++ b/tuts/001-lightsail-gs/ruby/scenario_getting_started.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative 'lightsail_wrapper' + +def run_scenario + client = Aws::Lightsail::Client.new + wrapper = LightsailWrapper.new(client) + puts "Running Lightsail getting started scenario..." + # TODO: setup, interact, teardown + puts "Scenario complete." +end + +run_scenario if __FILE__ == $PROGRAM_NAME diff --git a/tuts/001-lightsail-gs/ruby/spec/lightsail_wrapper_spec.rb b/tuts/001-lightsail-gs/ruby/spec/lightsail_wrapper_spec.rb new file mode 100644 index 0000000..34ff435 --- /dev/null +++ b/tuts/001-lightsail-gs/ruby/spec/lightsail_wrapper_spec.rb @@ -0,0 +1,13 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative '../lightsail_wrapper' + +RSpec.describe LightsailWrapper do + let(:client) { Aws::Lightsail::Client.new(stub_responses: true) } + let(:wrapper) { described_class.new(client) } + + it 'creates wrapper' do + expect(wrapper).not_to be_nil + end +end diff --git a/tuts/002-vpc-gs/ruby/Gemfile b/tuts/002-vpc-gs/ruby/Gemfile new file mode 100644 index 0000000..cb1eafb --- /dev/null +++ b/tuts/002-vpc-gs/ruby/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'aws-sdk-ec2' +gem 'rspec', group: :test diff --git a/tuts/002-vpc-gs/ruby/ec2_wrapper.rb b/tuts/002-vpc-gs/ruby/ec2_wrapper.rb new file mode 100644 index 0000000..af2bd07 --- /dev/null +++ b/tuts/002-vpc-gs/ruby/ec2_wrapper.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require 'aws-sdk-ec2' +require 'logger' + +class Ec2Wrapper + def initialize(client, logger: Logger.new($stdout)) + @client = client + @logger = logger + end + + # TODO: Add wrapper methods matching CLI tutorial actions +end diff --git a/tuts/002-vpc-gs/ruby/scenario_getting_started.rb b/tuts/002-vpc-gs/ruby/scenario_getting_started.rb new file mode 100644 index 0000000..50f6af6 --- /dev/null +++ b/tuts/002-vpc-gs/ruby/scenario_getting_started.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative 'ec2_wrapper' + +def run_scenario + client = Aws::Ec2::Client.new + wrapper = Ec2Wrapper.new(client) + puts "Running Ec2 getting started scenario..." + # TODO: setup, interact, teardown + puts "Scenario complete." +end + +run_scenario if __FILE__ == $PROGRAM_NAME diff --git a/tuts/002-vpc-gs/ruby/spec/ec2_wrapper_spec.rb b/tuts/002-vpc-gs/ruby/spec/ec2_wrapper_spec.rb new file mode 100644 index 0000000..55a7ae0 --- /dev/null +++ b/tuts/002-vpc-gs/ruby/spec/ec2_wrapper_spec.rb @@ -0,0 +1,13 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative '../ec2_wrapper' + +RSpec.describe Ec2Wrapper do + let(:client) { Aws::Ec2::Client.new(stub_responses: true) } + let(:wrapper) { described_class.new(client) } + + it 'creates wrapper' do + expect(wrapper).not_to be_nil + end +end diff --git a/tuts/003-s3-gettingstarted/ruby/Gemfile b/tuts/003-s3-gettingstarted/ruby/Gemfile new file mode 100644 index 0000000..dfe0dd8 --- /dev/null +++ b/tuts/003-s3-gettingstarted/ruby/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'aws-sdk-s3' +gem 'rspec', group: :test diff --git a/tuts/003-s3-gettingstarted/ruby/s3_wrapper.rb b/tuts/003-s3-gettingstarted/ruby/s3_wrapper.rb new file mode 100644 index 0000000..118dd9b --- /dev/null +++ b/tuts/003-s3-gettingstarted/ruby/s3_wrapper.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require 'aws-sdk-s3' +require 'logger' + +class S3Wrapper + def initialize(client, logger: Logger.new($stdout)) + @client = client + @logger = logger + end + + # TODO: Add wrapper methods matching CLI tutorial actions +end diff --git a/tuts/003-s3-gettingstarted/ruby/scenario_getting_started.rb b/tuts/003-s3-gettingstarted/ruby/scenario_getting_started.rb new file mode 100644 index 0000000..dab9d6b --- /dev/null +++ b/tuts/003-s3-gettingstarted/ruby/scenario_getting_started.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative 's3_wrapper' + +def run_scenario + client = Aws::S3::Client.new + wrapper = S3Wrapper.new(client) + puts "Running S3 getting started scenario..." + # TODO: setup, interact, teardown + puts "Scenario complete." +end + +run_scenario if __FILE__ == $PROGRAM_NAME diff --git a/tuts/003-s3-gettingstarted/ruby/spec/s3_wrapper_spec.rb b/tuts/003-s3-gettingstarted/ruby/spec/s3_wrapper_spec.rb new file mode 100644 index 0000000..4feeaca --- /dev/null +++ b/tuts/003-s3-gettingstarted/ruby/spec/s3_wrapper_spec.rb @@ -0,0 +1,13 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative '../s3_wrapper' + +RSpec.describe S3Wrapper do + let(:client) { Aws::S3::Client.new(stub_responses: true) } + let(:wrapper) { described_class.new(client) } + + it 'creates wrapper' do + expect(wrapper).not_to be_nil + end +end diff --git a/tuts/004-cloudmap-custom-attributes/ruby/Gemfile b/tuts/004-cloudmap-custom-attributes/ruby/Gemfile new file mode 100644 index 0000000..97898be --- /dev/null +++ b/tuts/004-cloudmap-custom-attributes/ruby/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'aws-sdk-servicediscovery' +gem 'rspec', group: :test diff --git a/tuts/004-cloudmap-custom-attributes/ruby/scenario_getting_started.rb b/tuts/004-cloudmap-custom-attributes/ruby/scenario_getting_started.rb new file mode 100644 index 0000000..5644897 --- /dev/null +++ b/tuts/004-cloudmap-custom-attributes/ruby/scenario_getting_started.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative 'servicediscovery_wrapper' + +def run_scenario + client = Aws::CloudMap::Client.new + wrapper = CloudMapWrapper.new(client) + puts "Running CloudMap getting started scenario..." + # TODO: setup, interact, teardown + puts "Scenario complete." +end + +run_scenario if __FILE__ == $PROGRAM_NAME diff --git a/tuts/004-cloudmap-custom-attributes/ruby/servicediscovery_wrapper.rb b/tuts/004-cloudmap-custom-attributes/ruby/servicediscovery_wrapper.rb new file mode 100644 index 0000000..82757c0 --- /dev/null +++ b/tuts/004-cloudmap-custom-attributes/ruby/servicediscovery_wrapper.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require 'aws-sdk-servicediscovery' +require 'logger' + +class CloudMapWrapper + def initialize(client, logger: Logger.new($stdout)) + @client = client + @logger = logger + end + + # TODO: Add wrapper methods matching CLI tutorial actions +end diff --git a/tuts/004-cloudmap-custom-attributes/ruby/spec/servicediscovery_wrapper_spec.rb b/tuts/004-cloudmap-custom-attributes/ruby/spec/servicediscovery_wrapper_spec.rb new file mode 100644 index 0000000..8d690e9 --- /dev/null +++ b/tuts/004-cloudmap-custom-attributes/ruby/spec/servicediscovery_wrapper_spec.rb @@ -0,0 +1,13 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative '../servicediscovery_wrapper' + +RSpec.describe CloudMapWrapper do + let(:client) { Aws::CloudMap::Client.new(stub_responses: true) } + let(:wrapper) { described_class.new(client) } + + it 'creates wrapper' do + expect(wrapper).not_to be_nil + end +end diff --git a/tuts/005-cloudfront-gettingstarted/ruby/Gemfile b/tuts/005-cloudfront-gettingstarted/ruby/Gemfile new file mode 100644 index 0000000..626f0f9 --- /dev/null +++ b/tuts/005-cloudfront-gettingstarted/ruby/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'aws-sdk-cloudfront' +gem 'rspec', group: :test diff --git a/tuts/005-cloudfront-gettingstarted/ruby/cloudfront_wrapper.rb b/tuts/005-cloudfront-gettingstarted/ruby/cloudfront_wrapper.rb new file mode 100644 index 0000000..1526728 --- /dev/null +++ b/tuts/005-cloudfront-gettingstarted/ruby/cloudfront_wrapper.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require 'aws-sdk-cloudfront' +require 'logger' + +class CloudFrontWrapper + def initialize(client, logger: Logger.new($stdout)) + @client = client + @logger = logger + end + + # TODO: Add wrapper methods matching CLI tutorial actions +end diff --git a/tuts/005-cloudfront-gettingstarted/ruby/scenario_getting_started.rb b/tuts/005-cloudfront-gettingstarted/ruby/scenario_getting_started.rb new file mode 100644 index 0000000..1099915 --- /dev/null +++ b/tuts/005-cloudfront-gettingstarted/ruby/scenario_getting_started.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative 'cloudfront_wrapper' + +def run_scenario + client = Aws::CloudFront::Client.new + wrapper = CloudFrontWrapper.new(client) + puts "Running CloudFront getting started scenario..." + # TODO: setup, interact, teardown + puts "Scenario complete." +end + +run_scenario if __FILE__ == $PROGRAM_NAME diff --git a/tuts/005-cloudfront-gettingstarted/ruby/spec/cloudfront_wrapper_spec.rb b/tuts/005-cloudfront-gettingstarted/ruby/spec/cloudfront_wrapper_spec.rb new file mode 100644 index 0000000..7e3505c --- /dev/null +++ b/tuts/005-cloudfront-gettingstarted/ruby/spec/cloudfront_wrapper_spec.rb @@ -0,0 +1,13 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative '../cloudfront_wrapper' + +RSpec.describe CloudFrontWrapper do + let(:client) { Aws::CloudFront::Client.new(stub_responses: true) } + let(:wrapper) { described_class.new(client) } + + it 'creates wrapper' do + expect(wrapper).not_to be_nil + end +end diff --git a/tuts/008-vpc-private-servers-gs/ruby/Gemfile b/tuts/008-vpc-private-servers-gs/ruby/Gemfile new file mode 100644 index 0000000..cb1eafb --- /dev/null +++ b/tuts/008-vpc-private-servers-gs/ruby/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'aws-sdk-ec2' +gem 'rspec', group: :test diff --git a/tuts/008-vpc-private-servers-gs/ruby/ec2_wrapper.rb b/tuts/008-vpc-private-servers-gs/ruby/ec2_wrapper.rb new file mode 100644 index 0000000..af2bd07 --- /dev/null +++ b/tuts/008-vpc-private-servers-gs/ruby/ec2_wrapper.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require 'aws-sdk-ec2' +require 'logger' + +class Ec2Wrapper + def initialize(client, logger: Logger.new($stdout)) + @client = client + @logger = logger + end + + # TODO: Add wrapper methods matching CLI tutorial actions +end diff --git a/tuts/008-vpc-private-servers-gs/ruby/scenario_getting_started.rb b/tuts/008-vpc-private-servers-gs/ruby/scenario_getting_started.rb new file mode 100644 index 0000000..50f6af6 --- /dev/null +++ b/tuts/008-vpc-private-servers-gs/ruby/scenario_getting_started.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative 'ec2_wrapper' + +def run_scenario + client = Aws::Ec2::Client.new + wrapper = Ec2Wrapper.new(client) + puts "Running Ec2 getting started scenario..." + # TODO: setup, interact, teardown + puts "Scenario complete." +end + +run_scenario if __FILE__ == $PROGRAM_NAME diff --git a/tuts/008-vpc-private-servers-gs/ruby/spec/ec2_wrapper_spec.rb b/tuts/008-vpc-private-servers-gs/ruby/spec/ec2_wrapper_spec.rb new file mode 100644 index 0000000..55a7ae0 --- /dev/null +++ b/tuts/008-vpc-private-servers-gs/ruby/spec/ec2_wrapper_spec.rb @@ -0,0 +1,13 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative '../ec2_wrapper' + +RSpec.describe Ec2Wrapper do + let(:client) { Aws::Ec2::Client.new(stub_responses: true) } + let(:wrapper) { described_class.new(client) } + + it 'creates wrapper' do + expect(wrapper).not_to be_nil + end +end diff --git a/tuts/009-vpc-ipam-gs/ruby/Gemfile b/tuts/009-vpc-ipam-gs/ruby/Gemfile new file mode 100644 index 0000000..cb1eafb --- /dev/null +++ b/tuts/009-vpc-ipam-gs/ruby/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'aws-sdk-ec2' +gem 'rspec', group: :test diff --git a/tuts/009-vpc-ipam-gs/ruby/ec2_wrapper.rb b/tuts/009-vpc-ipam-gs/ruby/ec2_wrapper.rb new file mode 100644 index 0000000..af2bd07 --- /dev/null +++ b/tuts/009-vpc-ipam-gs/ruby/ec2_wrapper.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require 'aws-sdk-ec2' +require 'logger' + +class Ec2Wrapper + def initialize(client, logger: Logger.new($stdout)) + @client = client + @logger = logger + end + + # TODO: Add wrapper methods matching CLI tutorial actions +end diff --git a/tuts/009-vpc-ipam-gs/ruby/scenario_getting_started.rb b/tuts/009-vpc-ipam-gs/ruby/scenario_getting_started.rb new file mode 100644 index 0000000..50f6af6 --- /dev/null +++ b/tuts/009-vpc-ipam-gs/ruby/scenario_getting_started.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative 'ec2_wrapper' + +def run_scenario + client = Aws::Ec2::Client.new + wrapper = Ec2Wrapper.new(client) + puts "Running Ec2 getting started scenario..." + # TODO: setup, interact, teardown + puts "Scenario complete." +end + +run_scenario if __FILE__ == $PROGRAM_NAME diff --git a/tuts/009-vpc-ipam-gs/ruby/spec/ec2_wrapper_spec.rb b/tuts/009-vpc-ipam-gs/ruby/spec/ec2_wrapper_spec.rb new file mode 100644 index 0000000..55a7ae0 --- /dev/null +++ b/tuts/009-vpc-ipam-gs/ruby/spec/ec2_wrapper_spec.rb @@ -0,0 +1,13 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative '../ec2_wrapper' + +RSpec.describe Ec2Wrapper do + let(:client) { Aws::Ec2::Client.new(stub_responses: true) } + let(:wrapper) { described_class.new(client) } + + it 'creates wrapper' do + expect(wrapper).not_to be_nil + end +end diff --git a/tuts/010-cloudmap-service-discovery/ruby/Gemfile b/tuts/010-cloudmap-service-discovery/ruby/Gemfile new file mode 100644 index 0000000..97898be --- /dev/null +++ b/tuts/010-cloudmap-service-discovery/ruby/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'aws-sdk-servicediscovery' +gem 'rspec', group: :test diff --git a/tuts/010-cloudmap-service-discovery/ruby/scenario_getting_started.rb b/tuts/010-cloudmap-service-discovery/ruby/scenario_getting_started.rb new file mode 100644 index 0000000..5644897 --- /dev/null +++ b/tuts/010-cloudmap-service-discovery/ruby/scenario_getting_started.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative 'servicediscovery_wrapper' + +def run_scenario + client = Aws::CloudMap::Client.new + wrapper = CloudMapWrapper.new(client) + puts "Running CloudMap getting started scenario..." + # TODO: setup, interact, teardown + puts "Scenario complete." +end + +run_scenario if __FILE__ == $PROGRAM_NAME diff --git a/tuts/010-cloudmap-service-discovery/ruby/servicediscovery_wrapper.rb b/tuts/010-cloudmap-service-discovery/ruby/servicediscovery_wrapper.rb new file mode 100644 index 0000000..82757c0 --- /dev/null +++ b/tuts/010-cloudmap-service-discovery/ruby/servicediscovery_wrapper.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require 'aws-sdk-servicediscovery' +require 'logger' + +class CloudMapWrapper + def initialize(client, logger: Logger.new($stdout)) + @client = client + @logger = logger + end + + # TODO: Add wrapper methods matching CLI tutorial actions +end diff --git a/tuts/010-cloudmap-service-discovery/ruby/spec/servicediscovery_wrapper_spec.rb b/tuts/010-cloudmap-service-discovery/ruby/spec/servicediscovery_wrapper_spec.rb new file mode 100644 index 0000000..8d690e9 --- /dev/null +++ b/tuts/010-cloudmap-service-discovery/ruby/spec/servicediscovery_wrapper_spec.rb @@ -0,0 +1,13 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative '../servicediscovery_wrapper' + +RSpec.describe CloudMapWrapper do + let(:client) { Aws::CloudMap::Client.new(stub_responses: true) } + let(:wrapper) { described_class.new(client) } + + it 'creates wrapper' do + expect(wrapper).not_to be_nil + end +end diff --git a/tuts/011-getting-started-batch-fargate/ruby/Gemfile b/tuts/011-getting-started-batch-fargate/ruby/Gemfile new file mode 100644 index 0000000..62ea7fa --- /dev/null +++ b/tuts/011-getting-started-batch-fargate/ruby/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'aws-sdk-batch' +gem 'rspec', group: :test diff --git a/tuts/011-getting-started-batch-fargate/ruby/batch_wrapper.rb b/tuts/011-getting-started-batch-fargate/ruby/batch_wrapper.rb new file mode 100644 index 0000000..41254d3 --- /dev/null +++ b/tuts/011-getting-started-batch-fargate/ruby/batch_wrapper.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require 'aws-sdk-batch' +require 'logger' + +class BatchWrapper + def initialize(client, logger: Logger.new($stdout)) + @client = client + @logger = logger + end + + # TODO: Add wrapper methods matching CLI tutorial actions +end diff --git a/tuts/011-getting-started-batch-fargate/ruby/scenario_getting_started.rb b/tuts/011-getting-started-batch-fargate/ruby/scenario_getting_started.rb new file mode 100644 index 0000000..0f0edd4 --- /dev/null +++ b/tuts/011-getting-started-batch-fargate/ruby/scenario_getting_started.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative 'batch_wrapper' + +def run_scenario + client = Aws::Batch::Client.new + wrapper = BatchWrapper.new(client) + puts "Running Batch getting started scenario..." + # TODO: setup, interact, teardown + puts "Scenario complete." +end + +run_scenario if __FILE__ == $PROGRAM_NAME diff --git a/tuts/011-getting-started-batch-fargate/ruby/spec/batch_wrapper_spec.rb b/tuts/011-getting-started-batch-fargate/ruby/spec/batch_wrapper_spec.rb new file mode 100644 index 0000000..682e675 --- /dev/null +++ b/tuts/011-getting-started-batch-fargate/ruby/spec/batch_wrapper_spec.rb @@ -0,0 +1,13 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative '../batch_wrapper' + +RSpec.describe BatchWrapper do + let(:client) { Aws::Batch::Client.new(stub_responses: true) } + let(:wrapper) { described_class.new(client) } + + it 'creates wrapper' do + expect(wrapper).not_to be_nil + end +end diff --git a/tuts/012-transitgateway-gettingstarted/ruby/Gemfile b/tuts/012-transitgateway-gettingstarted/ruby/Gemfile new file mode 100644 index 0000000..cb1eafb --- /dev/null +++ b/tuts/012-transitgateway-gettingstarted/ruby/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'aws-sdk-ec2' +gem 'rspec', group: :test diff --git a/tuts/012-transitgateway-gettingstarted/ruby/ec2_wrapper.rb b/tuts/012-transitgateway-gettingstarted/ruby/ec2_wrapper.rb new file mode 100644 index 0000000..af2bd07 --- /dev/null +++ b/tuts/012-transitgateway-gettingstarted/ruby/ec2_wrapper.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require 'aws-sdk-ec2' +require 'logger' + +class Ec2Wrapper + def initialize(client, logger: Logger.new($stdout)) + @client = client + @logger = logger + end + + # TODO: Add wrapper methods matching CLI tutorial actions +end diff --git a/tuts/012-transitgateway-gettingstarted/ruby/scenario_getting_started.rb b/tuts/012-transitgateway-gettingstarted/ruby/scenario_getting_started.rb new file mode 100644 index 0000000..50f6af6 --- /dev/null +++ b/tuts/012-transitgateway-gettingstarted/ruby/scenario_getting_started.rb @@ -0,0 +1,14 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative 'ec2_wrapper' + +def run_scenario + client = Aws::Ec2::Client.new + wrapper = Ec2Wrapper.new(client) + puts "Running Ec2 getting started scenario..." + # TODO: setup, interact, teardown + puts "Scenario complete." +end + +run_scenario if __FILE__ == $PROGRAM_NAME diff --git a/tuts/012-transitgateway-gettingstarted/ruby/spec/ec2_wrapper_spec.rb b/tuts/012-transitgateway-gettingstarted/ruby/spec/ec2_wrapper_spec.rb new file mode 100644 index 0000000..55a7ae0 --- /dev/null +++ b/tuts/012-transitgateway-gettingstarted/ruby/spec/ec2_wrapper_spec.rb @@ -0,0 +1,13 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +require_relative '../ec2_wrapper' + +RSpec.describe Ec2Wrapper do + let(:client) { Aws::Ec2::Client.new(stub_responses: true) } + let(:wrapper) { described_class.new(client) } + + it 'creates wrapper' do + expect(wrapper).not_to be_nil + end +end