<s> import urllib <EOL> from boto . connection import AWSQueryConnection <EOL> from boto . rds . dbinstance import DBInstance <EOL> from boto . rds . dbsecuritygroup import DBSecurityGroup <EOL> from boto . rds . optiongroup import OptionGroup , OptionGroupOption <EOL> from boto . rds . parametergroup import ParameterGroup <EOL> from boto . rds . dbsnapshot import DBSnapshot <EOL> from boto . rds . event import Event <EOL> from boto . rds . regioninfo import RDSRegionInfo <EOL> from boto . rds . dbsubnetgroup import DBSubnetGroup <EOL> from boto . rds . vpcsecuritygroupmembership import VPCSecurityGroupMembership <EOL> from boto . regioninfo import get_regions <EOL> from boto . rds . logfile import LogFile , LogFileObject <EOL> def regions ( ) : <EOL> """<STR_LIT>""" <EOL> return get_regions ( <EOL> '<STR_LIT>' , <EOL> region_cls = RDSRegionInfo , <EOL> connection_cls = RDSConnection <EOL> ) <EOL> def connect_to_region ( region_name , ** kw_params ) : <EOL> """<STR_LIT>""" <EOL> for region in regions ( ) : <EOL> if region . name == region_name : <EOL> return region . connect ( ** kw_params ) <EOL> return None <EOL> class RDSConnection ( AWSQueryConnection ) : <EOL> DefaultRegionName = '<STR_LIT>' <EOL> DefaultRegionEndpoint = '<STR_LIT>' <EOL> APIVersion = '<STR_LIT>' <EOL> def __init__ ( self , aws_access_key_id = None , aws_secret_access_key = None , <EOL> is_secure = True , port = None , proxy = None , proxy_port = None , <EOL> proxy_user = None , proxy_pass = None , debug = <NUM_LIT:0> , <EOL> https_connection_factory = None , region = None , path = '<STR_LIT:/>' , <EOL> security_token = None , validate_certs = True , <EOL> profile_name = None ) : <EOL> if not region : <EOL> region = RDSRegionInfo ( self , self . DefaultRegionName , <EOL> self . DefaultRegionEndpoint ) <EOL> self . region = region <EOL> super ( RDSConnection , self ) . __init__ ( aws_access_key_id , <EOL> aws_secret_access_key , <EOL> is_secure , port , proxy , proxy_port , <EOL> proxy_user , proxy_pass , <EOL> self . region . endpoint , debug , <EOL> https_connection_factory , path , <EOL> security_token , <EOL> validate_certs = validate_certs , <EOL> profile_name = profile_name ) <EOL> def _required_auth_capability ( self ) : <EOL> return [ '<STR_LIT>' ] <EOL> def get_all_dbinstances ( self , instance_id = None , max_records = None , <EOL> marker = None ) : <EOL> """<STR_LIT>""" <EOL> params = { } <EOL> if instance_id : <EOL> params [ '<STR_LIT>' ] = instance_id <EOL> if max_records : <EOL> params [ '<STR_LIT>' ] = max_records <EOL> if marker : <EOL> params [ '<STR_LIT>' ] = marker <EOL> return self . get_list ( '<STR_LIT>' , params , <EOL> [ ( '<STR_LIT>' , DBInstance ) ] ) <EOL> def create_dbinstance ( self , <EOL> id , <EOL> allocated_storage , <EOL> instance_class , <EOL> master_username , <EOL> master_password , <EOL> port = <NUM_LIT> , <EOL> engine = '<STR_LIT>' , <EOL> db_name = None , <EOL> param_group = None , <EOL> security_groups = None , <EOL> availability_zone = None , <EOL> preferred_maintenance_window = None , <EOL> backup_retention_period = None , <EOL> preferred_backup_window = None , <EOL> multi_az = False , <EOL> engine_version = None , <EOL> auto_minor_version_upgrade = True , <EOL> character_set_name = None , <EOL> db_subnet_group_name = None , <EOL> license_model = None , <EOL> option_group_name = None , <EOL> iops = None , <EOL> vpc_security_groups = None , <EOL> ) : <EOL> """<STR_LIT>""" <EOL> params = { <EOL> '<STR_LIT>' : allocated_storage , <EOL> '<STR_LIT>' : str ( auto_minor_version_upgrade ) . lower ( ) if auto_minor_version_upgrade else None , <EOL> '<STR_LIT>' : availability_zone , <EOL> '<STR_LIT>' : backup_retention_period , <EOL> '<STR_LIT>' : character_set_name , <EOL> '<STR_LIT>' : instance_class , <EOL> '<STR_LIT>' : id , <EOL> '<STR_LIT>' : db_name , <EOL> '<STR_LIT>' : ( param_group . name <EOL> if isinstance ( param_group , ParameterGroup ) <EOL> else param_group ) , <EOL> '<STR_LIT>' : db_subnet_group_name , <EOL> '<STR_LIT>' : engine , <EOL> '<STR_LIT>' : engine_version , <EOL> '<STR_LIT>' : iops , <EOL> '<STR_LIT>' : license_model , <EOL> '<STR_LIT>' : master_username , <EOL> '<STR_LIT>' : master_password , <EOL> '<STR_LIT>' : str ( multi_az ) . lower ( ) if multi_az else None , <EOL> '<STR_LIT>' : option_group_name , <EOL> '<STR_LIT>' : port , <EOL> '<STR_LIT>' : preferred_backup_window , <EOL> '<STR_LIT>' : preferred_maintenance_window , <EOL> } <EOL> if security_groups : <EOL> l = [ ] <EOL> for group in security_groups : <EOL> if isinstance ( group , DBSecurityGroup ) : <EOL> l . append ( group . name ) <EOL> else : <EOL> l . append ( group ) <EOL> self . build_list_params ( params , l , '<STR_LIT>' ) <EOL> if vpc_security_groups : <EOL> l = [ ] <EOL> for vpc_grp in vpc_security_groups : <EOL> if isinstance ( vpc_grp , VPCSecurityGroupMembership ) : <EOL> l . append ( vpc_grp . vpc_group ) <EOL> else : <EOL> l . append ( vpc_grp ) <EOL> self . build_list_params ( params , l , '<STR_LIT>' ) <EOL> for k , v in list ( params . items ( ) ) : <EOL> if v is None : del ( params [ k ] ) <EOL> return self . get_object ( '<STR_LIT>' , params , DBInstance ) <EOL> def create_dbinstance_read_replica ( self , id , source_id , <EOL> instance_class = None , <EOL> port = <NUM_LIT> , <EOL> availability_zone = None , <EOL> auto_minor_version_upgrade = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : id , <EOL> '<STR_LIT>' : source_id } <EOL> if instance_class : <EOL> params [ '<STR_LIT>' ] = instance_class <EOL> if port : <EOL> params [ '<STR_LIT>' ] = port <EOL> if availability_zone : <EOL> params [ '<STR_LIT>' ] = availability_zone <EOL> if auto_minor_version_upgrade is not None : <EOL> if auto_minor_version_upgrade is True : <EOL> params [ '<STR_LIT>' ] = '<STR_LIT:true>' <EOL> else : <EOL> params [ '<STR_LIT>' ] = '<STR_LIT:false>' <EOL> return self . get_object ( '<STR_LIT>' , <EOL> params , DBInstance ) <EOL> def promote_read_replica ( self , id , <EOL> backup_retention_period = None , <EOL> preferred_backup_window = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : id } <EOL> if backup_retention_period is not None : <EOL> params [ '<STR_LIT>' ] = backup_retention_period <EOL> if preferred_backup_window : <EOL> params [ '<STR_LIT>' ] = preferred_backup_window <EOL> return self . get_object ( '<STR_LIT>' , params , DBInstance ) <EOL> def modify_dbinstance ( self , id , param_group = None , security_groups = None , <EOL> preferred_maintenance_window = None , <EOL> master_password = None , allocated_storage = None , <EOL> instance_class = None , <EOL> backup_retention_period = None , <EOL> preferred_backup_window = None , <EOL> multi_az = False , <EOL> apply_immediately = False , <EOL> iops = None , <EOL> vpc_security_groups = None , <EOL> new_instance_id = None , <EOL> ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : id } <EOL> if param_group : <EOL> params [ '<STR_LIT>' ] = ( param_group . name <EOL> if isinstance ( param_group , ParameterGroup ) <EOL> else param_group ) <EOL> if security_groups : <EOL> l = [ ] <EOL> for group in security_groups : <EOL> if isinstance ( group , DBSecurityGroup ) : <EOL> l . append ( group . name ) <EOL> else : <EOL> l . append ( group ) <EOL> self . build_list_params ( params , l , '<STR_LIT>' ) <EOL> if vpc_security_groups : <EOL> l = [ ] <EOL> for vpc_grp in vpc_security_groups : <EOL> if isinstance ( vpc_grp , VPCSecurityGroupMembership ) : <EOL> l . append ( vpc_grp . vpc_group ) <EOL> else : <EOL> l . append ( vpc_grp ) <EOL> self . build_list_params ( params , l , '<STR_LIT>' ) <EOL> if preferred_maintenance_window : <EOL> params [ '<STR_LIT>' ] = preferred_maintenance_window <EOL> if master_password : <EOL> params [ '<STR_LIT>' ] = master_password <EOL> if allocated_storage : <EOL> params [ '<STR_LIT>' ] = allocated_storage <EOL> if instance_class : <EOL> params [ '<STR_LIT>' ] = instance_class <EOL> if backup_retention_period is not None : <EOL> params [ '<STR_LIT>' ] = backup_retention_period <EOL> if preferred_backup_window : <EOL> params [ '<STR_LIT>' ] = preferred_backup_window <EOL> if multi_az : <EOL> params [ '<STR_LIT>' ] = '<STR_LIT:true>' <EOL> if apply_immediately : <EOL> params [ '<STR_LIT>' ] = '<STR_LIT:true>' <EOL> if iops : <EOL> params [ '<STR_LIT>' ] = iops <EOL> if new_instance_id : <EOL> params [ '<STR_LIT>' ] = new_instance_id <EOL> return self . get_object ( '<STR_LIT>' , params , DBInstance ) <EOL> def delete_dbinstance ( self , id , skip_final_snapshot = False , <EOL> final_snapshot_id = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : id } <EOL> if skip_final_snapshot : <EOL> params [ '<STR_LIT>' ] = '<STR_LIT:true>' <EOL> else : <EOL> params [ '<STR_LIT>' ] = '<STR_LIT:false>' <EOL> params [ '<STR_LIT>' ] = final_snapshot_id <EOL> return self . get_object ( '<STR_LIT>' , params , DBInstance ) <EOL> def reboot_dbinstance ( self , id ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : id } <EOL> return self . get_object ( '<STR_LIT>' , params , DBInstance ) <EOL> def get_all_dbparameter_groups ( self , groupname = None , max_records = None , <EOL> marker = None ) : <EOL> """<STR_LIT>""" <EOL> params = { } <EOL> if groupname : <EOL> params [ '<STR_LIT>' ] = groupname <EOL> if max_records : <EOL> params [ '<STR_LIT>' ] = max_records <EOL> if marker : <EOL> params [ '<STR_LIT>' ] = marker <EOL> return self . get_list ( '<STR_LIT>' , params , <EOL> [ ( '<STR_LIT>' , ParameterGroup ) ] ) <EOL> def get_all_dbparameters ( self , groupname , source = None , <EOL> max_records = None , marker = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : groupname } <EOL> if source : <EOL> params [ '<STR_LIT>' ] = source <EOL> if max_records : <EOL> params [ '<STR_LIT>' ] = max_records <EOL> if marker : <EOL> params [ '<STR_LIT>' ] = marker <EOL> pg = self . get_object ( '<STR_LIT>' , params , ParameterGroup ) <EOL> pg . name = groupname <EOL> return pg <EOL> def create_parameter_group ( self , name , engine = '<STR_LIT>' , description = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : name , <EOL> '<STR_LIT>' : engine , <EOL> '<STR_LIT>' : description } <EOL> return self . get_object ( '<STR_LIT>' , params , ParameterGroup ) <EOL> def modify_parameter_group ( self , name , parameters = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : name } <EOL> for i in range ( <NUM_LIT:0> , len ( parameters ) ) : <EOL> parameter = parameters [ i ] <EOL> parameter . merge ( params , i + <NUM_LIT:1> ) <EOL> return self . get_list ( '<STR_LIT>' , params , <EOL> ParameterGroup , verb = '<STR_LIT:POST>' ) <EOL> def reset_parameter_group ( self , name , reset_all_params = False , <EOL> parameters = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : name } <EOL> if reset_all_params : <EOL> params [ '<STR_LIT>' ] = '<STR_LIT:true>' <EOL> else : <EOL> params [ '<STR_LIT>' ] = '<STR_LIT:false>' <EOL> for i in range ( <NUM_LIT:0> , len ( parameters ) ) : <EOL> parameter = parameters [ i ] <EOL> parameter . merge ( params , i + <NUM_LIT:1> ) <EOL> return self . get_status ( '<STR_LIT>' , params ) <EOL> def delete_parameter_group ( self , name ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : name } <EOL> return self . get_status ( '<STR_LIT>' , params ) <EOL> def get_all_dbsecurity_groups ( self , groupname = None , max_records = None , <EOL> marker = None ) : <EOL> """<STR_LIT>""" <EOL> params = { } <EOL> if groupname : <EOL> params [ '<STR_LIT>' ] = groupname <EOL> if max_records : <EOL> params [ '<STR_LIT>' ] = max_records <EOL> if marker : <EOL> params [ '<STR_LIT>' ] = marker <EOL> return self . get_list ( '<STR_LIT>' , params , <EOL> [ ( '<STR_LIT>' , DBSecurityGroup ) ] ) <EOL> def create_dbsecurity_group ( self , name , description = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : name } <EOL> if description : <EOL> params [ '<STR_LIT>' ] = description <EOL> group = self . get_object ( '<STR_LIT>' , params , <EOL> DBSecurityGroup ) <EOL> group . name = name <EOL> group . description = description <EOL> return group <EOL> def delete_dbsecurity_group ( self , name ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : name } <EOL> return self . get_status ( '<STR_LIT>' , params ) <EOL> def authorize_dbsecurity_group ( self , group_name , cidr_ip = None , <EOL> ec2_security_group_name = None , <EOL> ec2_security_group_owner_id = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : group_name } <EOL> if ec2_security_group_name : <EOL> params [ '<STR_LIT>' ] = ec2_security_group_name <EOL> if ec2_security_group_owner_id : <EOL> params [ '<STR_LIT>' ] = ec2_security_group_owner_id <EOL> if cidr_ip : <EOL> params [ '<STR_LIT>' ] = urllib . quote ( cidr_ip ) <EOL> return self . get_object ( '<STR_LIT>' , params , <EOL> DBSecurityGroup ) <EOL> def revoke_dbsecurity_group ( self , group_name , ec2_security_group_name = None , <EOL> ec2_security_group_owner_id = None , cidr_ip = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : group_name } <EOL> if ec2_security_group_name : <EOL> params [ '<STR_LIT>' ] = ec2_security_group_name <EOL> if ec2_security_group_owner_id : <EOL> params [ '<STR_LIT>' ] = ec2_security_group_owner_id <EOL> if cidr_ip : <EOL> params [ '<STR_LIT>' ] = cidr_ip <EOL> return self . get_object ( '<STR_LIT>' , params , <EOL> DBSecurityGroup ) <EOL> revoke_security_group = revoke_dbsecurity_group <EOL> def get_all_dbsnapshots ( self , snapshot_id = None , instance_id = None , <EOL> max_records = None , marker = None ) : <EOL> """<STR_LIT>""" <EOL> params = { } <EOL> if snapshot_id : <EOL> params [ '<STR_LIT>' ] = snapshot_id <EOL> if instance_id : <EOL> params [ '<STR_LIT>' ] = instance_id <EOL> if max_records : <EOL> params [ '<STR_LIT>' ] = max_records <EOL> if marker : <EOL> params [ '<STR_LIT>' ] = marker <EOL> return self . get_list ( '<STR_LIT>' , params , <EOL> [ ( '<STR_LIT>' , DBSnapshot ) ] ) <EOL> def get_all_logs ( self , dbinstance_id , max_records = None , marker = None , file_size = None , filename_contains = None , file_last_written = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : dbinstance_id } <EOL> if file_size : <EOL> params [ '<STR_LIT>' ] = file_size <EOL> if filename_contains : <EOL> params [ '<STR_LIT>' ] = filename_contains <EOL> if file_last_written : <EOL> params [ '<STR_LIT>' ] = file_last_written <EOL> if marker : <EOL> params [ '<STR_LIT>' ] = marker <EOL> if max_records : <EOL> params [ '<STR_LIT>' ] = max_records <EOL> return self . get_list ( '<STR_LIT>' , params , <EOL> [ ( '<STR_LIT>' , LogFile ) ] ) <EOL> def get_log_file ( self , dbinstance_id , log_file_name , marker = None , number_of_lines = None , max_records = None ) : <EOL> """<STR_LIT>""" <EOL> params = { <EOL> '<STR_LIT>' : dbinstance_id , <EOL> '<STR_LIT>' : log_file_name , <EOL> } <EOL> if marker : <EOL> params [ '<STR_LIT>' ] = marker <EOL> if number_of_lines : <EOL> params [ '<STR_LIT>' ] = number_of_lines <EOL> if max_records : <EOL> params [ '<STR_LIT>' ] = max_records <EOL> logfile = self . get_object ( '<STR_LIT>' , params , LogFileObject ) <EOL> if logfile : <EOL> logfile . log_filename = log_file_name <EOL> logfile . dbinstance_id = dbinstance_id <EOL> return logfile <EOL> def create_dbsnapshot ( self , snapshot_id , dbinstance_id ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : snapshot_id , <EOL> '<STR_LIT>' : dbinstance_id } <EOL> return self . get_object ( '<STR_LIT>' , params , DBSnapshot ) <EOL> def copy_dbsnapshot ( self , source_snapshot_id , target_snapshot_id ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : source_snapshot_id , <EOL> '<STR_LIT>' : target_snapshot_id } <EOL> return self . get_object ( '<STR_LIT>' , params , DBSnapshot ) <EOL> def delete_dbsnapshot ( self , identifier ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : identifier } <EOL> return self . get_object ( '<STR_LIT>' , params , DBSnapshot ) <EOL> def restore_dbinstance_from_dbsnapshot ( self , identifier , instance_id , <EOL> instance_class , port = None , <EOL> availability_zone = None , <EOL> multi_az = None , <EOL> auto_minor_version_upgrade = None , <EOL> db_subnet_group_name = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : identifier , <EOL> '<STR_LIT>' : instance_id , <EOL> '<STR_LIT>' : instance_class } <EOL> if port : <EOL> params [ '<STR_LIT>' ] = port <EOL> if availability_zone : <EOL> params [ '<STR_LIT>' ] = availability_zone <EOL> if multi_az is not None : <EOL> params [ '<STR_LIT>' ] = str ( multi_az ) . lower ( ) <EOL> if auto_minor_version_upgrade is not None : <EOL> params [ '<STR_LIT>' ] = str ( auto_minor_version_upgrade ) . lower ( ) <EOL> if db_subnet_group_name is not None : <EOL> params [ '<STR_LIT>' ] = db_subnet_group_name <EOL> return self . get_object ( '<STR_LIT>' , <EOL> params , DBInstance ) <EOL> def restore_dbinstance_from_point_in_time ( self , source_instance_id , <EOL> target_instance_id , <EOL> use_latest = False , <EOL> restore_time = None , <EOL> dbinstance_class = None , <EOL> port = None , <EOL> availability_zone = None , <EOL> db_subnet_group_name = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : source_instance_id , <EOL> '<STR_LIT>' : target_instance_id } <EOL> if use_latest : <EOL> params [ '<STR_LIT>' ] = '<STR_LIT:true>' <EOL> elif restore_time : <EOL> params [ '<STR_LIT>' ] = restore_time . isoformat ( ) <EOL> if dbinstance_class : <EOL> params [ '<STR_LIT>' ] = dbinstance_class <EOL> if port : <EOL> params [ '<STR_LIT>' ] = port <EOL> if availability_zone : <EOL> params [ '<STR_LIT>' ] = availability_zone <EOL> if db_subnet_group_name is not None : <EOL> params [ '<STR_LIT>' ] = db_subnet_group_name <EOL> return self . get_object ( '<STR_LIT>' , <EOL> params , DBInstance ) <EOL> def get_all_events ( self , source_identifier = None , source_type = None , <EOL> start_time = None , end_time = None , <EOL> max_records = None , marker = None ) : <EOL> """<STR_LIT>""" <EOL> params = { } <EOL> if source_identifier and source_type : <EOL> params [ '<STR_LIT>' ] = source_identifier <EOL> params [ '<STR_LIT>' ] = source_type <EOL> if start_time : <EOL> params [ '<STR_LIT>' ] = start_time . isoformat ( ) <EOL> if end_time : <EOL> params [ '<STR_LIT>' ] = end_time . isoformat ( ) <EOL> if max_records : <EOL> params [ '<STR_LIT>' ] = max_records <EOL> if marker : <EOL> params [ '<STR_LIT>' ] = marker <EOL> return self . get_list ( '<STR_LIT>' , params , [ ( '<STR_LIT>' , Event ) ] ) <EOL> def create_db_subnet_group ( self , name , desc , subnet_ids ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : name , <EOL> '<STR_LIT>' : desc } <EOL> self . build_list_params ( params , subnet_ids , '<STR_LIT>' ) <EOL> return self . get_object ( '<STR_LIT>' , params , DBSubnetGroup ) <EOL> def delete_db_subnet_group ( self , name ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : name } <EOL> return self . get_object ( '<STR_LIT>' , params , DBSubnetGroup ) <EOL> def get_all_db_subnet_groups ( self , name = None , max_records = None , marker = None ) : <EOL> """<STR_LIT>""" <EOL> params = dict ( ) <EOL> if name is not None : <EOL> params [ '<STR_LIT>' ] = name <EOL> if max_records is not None : <EOL> params [ '<STR_LIT>' ] = max_records <EOL> if marker is not None : <EOL> params [ '<STR_LIT>' ] = marker <EOL> return self . get_list ( '<STR_LIT>' , params , [ ( '<STR_LIT>' , DBSubnetGroup ) ] ) <EOL> def modify_db_subnet_group ( self , name , description = None , subnet_ids = None ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : name } <EOL> if description is not None : <EOL> params [ '<STR_LIT>' ] = description <EOL> if subnet_ids is not None : <EOL> self . build_list_params ( params , subnet_ids , '<STR_LIT>' ) <EOL> return self . get_object ( '<STR_LIT>' , params , DBSubnetGroup ) <EOL> def create_option_group ( self , name , engine_name , major_engine_version , <EOL> description = None ) : <EOL> """<STR_LIT>""" <EOL> params = { <EOL> '<STR_LIT>' : name , <EOL> '<STR_LIT>' : engine_name , <EOL> '<STR_LIT>' : major_engine_version , <EOL> '<STR_LIT>' : description , <EOL> } <EOL> group = self . get_object ( '<STR_LIT>' , params , OptionGroup ) <EOL> group . name = name <EOL> group . engine_name = engine_name <EOL> group . major_engine_version = major_engine_version <EOL> group . description = description <EOL> return group <EOL> def delete_option_group ( self , name ) : <EOL> """<STR_LIT>""" <EOL> params = { '<STR_LIT>' : name } <EOL> return self . get_status ( '<STR_LIT>' , params ) <EOL> def describe_option_groups ( self , name = None , engine_name = None , <EOL> major_engine_version = None , max_records = <NUM_LIT:100> , <EOL> marker = None ) : <EOL> """<STR_LIT>""" <EOL> params = { } <EOL> if name : <EOL> params [ '<STR_LIT>' ] = name <EOL> elif engine_name and major_engine_version : <EOL> params [ '<STR_LIT>' ] = engine_name <EOL> params [ '<STR_LIT>' ] = major_engine_version <EOL> if max_records : <EOL> params [ '<STR_LIT>' ] = int ( max_records ) <EOL> if marker : <EOL> params [ '<STR_LIT>' ] = marker <EOL> return self . get_list ( '<STR_LIT>' , params , [ <EOL> ( '<STR_LIT>' , OptionGroup ) <EOL> ] ) <EOL> def describe_option_group_options ( self , engine_name = None , <EOL> major_engine_version = None , max_records = <NUM_LIT:100> , <EOL> marker = None ) : <EOL> """<STR_LIT>""" <EOL> params = { } <EOL> if engine_name and major_engine_version : <EOL> params [ '<STR_LIT>' ] = engine_name <EOL> params [ '<STR_LIT>' ] = major_engine_version <EOL> if max_records : <EOL> params [ '<STR_LIT>' ] = int ( max_records ) <EOL> if marker : <EOL> params [ '<STR_LIT>' ] = marker <EOL> return self . get_list ( '<STR_LIT>' , params , [ <EOL> ( '<STR_LIT>' , OptionGroupOption ) <EOL> ] ) </s>
