Skip to main content

AWS Traffic Policy Document creation library

Project description

https://travis-ci.org/cloudtools/atc53.png?branch=master

About

atc53 - library to create AWS Route53 Traffic Policy Document descriptions.

This library operates in a similar fashion to troposphere by aiming for compatibility and familiarity when defining infrastructure.

Installation

atc53 can be installed using the pip distribution system for Python by issuing:

$ pip install atc53

Examples

A simple example, showing a fail over rule between two load balancers:

from atc53 import PolicyDocument
from atc53.endpoint import Endpoint
from atc53.rule.failover import FailoverRule, Primary, Secondary

p = PolicyDocument()
main = Endpoint('MainEndpoint',
                Type='elastic-load-balancer',
                Value='elb-222222.us-west-1.elb.amazonaws.com')
backup = Endpoint('BackupEndpoint',
                  Type='elastic-load-balancer',
                  Value='elb-111111.us-west-1.elb.amazonaws.com')
rule = FailoverRule('TestFailoverRule',
                    Primary=Primary(
                        EndpointReference='MainEndpoint'),
                    Secondary=Secondary(
                        EndpointReference='BackupEndpoint')
                    )
p.add_endpoint(main)
p.add_endpoint(backup)
p.add_rule(rule)
print(p.to_json())

Licensing

atc53 is licensed under the BSD 2-Clause license. See LICENSE for the full license text.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for atc53, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size atc53-0.1.0-py2-none-any.whl (8.7 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size atc53-0.1.0.tar.gz (6.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page