def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, debug=0, https_connection_factory=None, region=None, path='/', security_token=None, validate_certs=True): if not region: region = RDSRegionInfo(self, self.DefaultRegionName, self.DefaultRegionEndpoint) self.region = region AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.region.endpoint, debug, https_connection_factory, path, security_token, validate_certs=validate_certs)
def regions(): """ Get all available regions for the RDS service. :rtype: list :return: A list of :class:`boto.rds.regioninfo.RDSRegionInfo` """ return [ RDSRegionInfo(name='us-east-1', endpoint='rds.amazonaws.com'), RDSRegionInfo(name='eu-west-1', endpoint='eu-west-1.rds.amazonaws.com'), RDSRegionInfo(name='us-west-1', endpoint='us-west-1.rds.amazonaws.com'), RDSRegionInfo(name='ap-southeast-1', endpoint='ap-southeast-1.rds.amazonaws.com') ]
def __init__(self, id, allocated_storage, instance_class, master_username, master_password, env_type, instance_type=None, port=3306, engine='MySQL5.1', db_name=None, param_group=None, security_groups=None, availability_zone=None, preferred_maintenance_window=None, backup_retention_period=None, preferred_backup_window=None, multi_az=False, engine_version=None, auto_minor_version_upgrade=True): self.settings = import_settings(env_type) self._credentials = { "aws_access_key_id": self.settings['AWS_ACCESS_KEY_ID'], "aws_secret_access_key": self.settings['AWS_SECRET_ACCESS_KEY'], "region": RDSRegionInfo( name=self.settings['AWS_REGION'], endpoint=self.settings['RDS_ENDPOINT'], ) } self.creation_data = { 'id': id, 'allocated_storage': allocated_storage, 'instance_class': self.INSTANCE_SIZES[instance_class], 'engine': engine, 'master_username': master_username, 'master_password': master_password, 'port': port, 'db_name': db_name, 'param_group': param_group, 'security_groups': security_groups, 'availability_zone': availability_zone, 'preferred_maintenance_window': preferred_maintenance_window, 'backup_retention_period': backup_retention_period, 'preferred_backup_window': preferred_backup_window, 'multi_az': multi_az, 'engine_version': engine_version, 'auto_minor_version_upgrade': auto_minor_version_upgrade, } self.instance = None self.created = bool(self.instance) self.instance_type = instance_type