GithubHelp home page GithubHelp logo

route53_a_record's Introduction

Route53ARecord

Create, update or delete route53 A records.

Installation

Add this line to your application's Gemfile:

gem 'route53_a_record'

And then execute:

$ bundle

Or install it yourself as:

$ gem install route53_a_record

Usage

Create, Update, or Delete an A Record

require 'route53_a_record'

# aws credentials
aws_access_key_id = 'AKIAIOSFODNN7EXAMPLE'
aws_secret_access_key = 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'

# aws hosted zone and a like properties
aws_hosted_zone = 'K5NPEL7EXAMPLE'
aws_hosted_zone_a_entry = '10.1.1.1'
aws_hosted_zone_domain = 'route53.example.com'

# The Route53ARecord::Record is used to cescribe the record you want
# to create, update or delete. The last parameter is the `ttl` which defaults
# to `15` (seconds) if not specified.
record = Route53ARecord::Record.new(aws_hosted_zone, aws_hosted_zone_domain, aws_hosted_zone_a_entry, 30)

# The `Route53ARecord::Handler` is used to perform the creation or
# update if the given `Route53ARecord::Record`. It provides a
# parameter overwrite which has to be used for updates. If it is
# set to `false` updates will raise an exception. The default is `true`.
handler = Route53ARecord::Handler.new(aws_access_key_id, aws_secret_access_key, true)

# to create the A record
handler.create(record)


# to delete the A record
handler.delete(record)

Contributing

  1. Fork it ( https://github.com/[my-github-username]/route53_a_record/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.