ó FRTc@s\dZddlmZdefd„ƒYZdefd„ƒYZdefd„ƒYZd S( s Represents an DBSecurityGroup iÿÿÿÿ(t SecurityGrouptDBSecurityGroupcBseeZdZddddd„Zd„Zd„Zd„Zd„Zddd„Z ddd„Z RS( sº Represents an RDS database security group Properties reference available from the AWS documentation at http://docs.amazonwebservices.com/AmazonRDS/latest/APIReference/API_DeleteDBSecurityGroup.html :ivar Status: The current status of the security group. Possible values are [ active, ? ]. Reference documentation lacks specifics of possibilities :ivar connection: :py:class:`boto.rds.RDSConnection` associated with the current object :ivar description: The description of the security group :ivar ec2_groups: List of :py:class:`EC2 Security Group ` objects that this security group PERMITS :ivar ip_ranges: List of :py:class:`boto.rds.dbsecuritygroup.IPRange` objects (containing CIDR addresses) that this security group PERMITS :ivar name: Name of the security group :ivar owner_id: ID of the owner of the security group. Can be 'None' cCs:||_||_||_||_g|_g|_dS(N(t connectiontowner_idtnamet descriptiont ec2_groupst ip_ranges(tselfRRRR((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyt__init__.s      cCs d|jS(NsDBSecurityGroup:%s(R(R((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyt__repr__7scCs`|dkr,t|ƒ}|jj|ƒ|S|dkrXt|ƒ}|jj|ƒ|SdSdS(NtIPRangetEC2SecurityGroup(R RtappendR RtNone(RRtattrsRtcidrtec2_grp((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyt startElement:s    cCsk|dkr||_nO|dkr0||_n7|dkrH||_n|dkrWnt|||ƒdS(NtOwnerIdtDBSecurityGroupNametDBSecurityGroupDescriptiontIPRanges(RRRtsetattr(RRtvalueR((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyt endElementFs       cCs|jj|jƒS(N(Rtdelete_dbsecurity_groupR(R((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pytdeleteRscCsLt|tƒr$|j}|j}n d}d}|jj|j|||ƒS(s³ Add a new rule to this DBSecurity group. You need to pass in either a CIDR block to authorize or and EC2 SecurityGroup. :type cidr_ip: string :param cidr_ip: A valid CIDR IP range to authorize :type ec2_group: :class:`boto.ec2.securitygroup.SecurityGroup` :param ec2_group: An EC2 security group to authorize :rtype: bool :return: True if successful. N(t isinstanceRRRRRtauthorize_dbsecurity_group(Rtcidr_ipt ec2_groupt group_nametgroup_owner_id((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyt authorizeUs  cCsYt|tƒr@|j}|j}|jj|jd|d|ƒS|jj|jd|ƒS(sÆ Revoke access to a CIDR range or EC2 SecurityGroup. You need to pass in either a CIDR block or an EC2 SecurityGroup from which to revoke access. :type cidr_ip: string :param cidr_ip: A valid CIDR IP range to revoke :type ec2_group: :class:`boto.ec2.securitygroup.SecurityGroup` :param ec2_group: An EC2 security group to revoke :rtype: bool :return: True if successful. tec2_security_group_nametec2_security_group_owner_idR(RRRRRtrevoke_dbsecurity_group(RRRR R!((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pytrevokeos     N( t__name__t __module__t__doc__RR R RRRR"R&(((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyRs  R cBs5eZdZdd„Zd„Zd„Zd„ZRS(sj Describes a CIDR address range for use in a DBSecurityGroup :ivar cidr_ip: IP Address range cCs||_d|_d|_dS(N(tparentRRtstatus(RR*((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyR ‘s  cCs d|jS(Ns IPRange:%s(R(R((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyR –scCsdS(N((RRRR((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyR™scCsD|dkr||_n(|dkr0||_nt|||ƒdS(NtCIDRIPtStatus(RR+R(RRRR((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyRœs     N(R'R(R)RR R RR(((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyR Šs    R cBs5eZdZdd„Zd„Zd„Zd„ZRS(sF Describes an EC2 security group for use in a DBSecurityGroup cCs||_d|_d|_dS(N(R*RRR(RR*((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyR ©s  cCs d|jS(NsEC2SecurityGroup:%s(R(R((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyR ®scCsdS(N((RRRR((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyR±scCsD|dkr||_n(|dkr0||_nt|||ƒdS(NtEC2SecurityGroupNametEC2SecurityGroupOwnerId(RRR(RRRR((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyRŽs     N(R'R(R)RR R RR(((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pyR €s    N(R)tboto.ec2.securitygroupRtobjectRR R (((sE/opt/freeware/lib/python2.7/site-packages/boto/rds/dbsecuritygroup.pytso