%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/modules/boto_rds.pyo

�
���^c)@@s[dZddlmZmZmZddlZddlZddlZddl	j
jZddlZddl
mZeje�ZddlmZydddlZddlZddlmZejd�jej�ejd�jej�eZWnek
reZnXi*d	efd
6defd6d
efd6defd6de fd6defd6de fd6de fd6defd6de fd6de fd6de fd 6d!e fd"6d#efd$6d%e!fd&6d'e fd(6d)e fd*6d+e fd,6d-e fd.6d/e fd06d1efd26d3e fd46d5e fd66d7e fd86d9e fd:6d;efd<6d=e fd>6d?efd@6dAe fdB6dCe fdD6dEe fdF6dGefdH6dIe fdJ6dKe fdL6dMefdN6dOefdP6dQefdR6dSe fdT6dUe!fdV6dWe fdX6dYe fdZ6d[e!fd\6Z"d]�Z#d^�Z$dddddd_�Z&dddddd`�Z'dddddda�Z(ddddddb�Z)ddddddddddddddddddddddddddddddddddddddc�%Z*ddddddddddddddddddd�Z+dddddde�Z,ddddddf�Z-ddddddg�Z.dhddddddi�Z/ddddddj�Z0dddkdddddl�Z1dddmdddddn�Z2ddddddo�Z3dddddddedpdq�	Z4dddddr�Z5ddddds�Z6dddddt�Z7ddddddddu�Z8ddddddddv�Z9dddddddddddddddddddddddddddddddddddddddddw�(Z:dx�Z;dS(yu�
Connection module for Amazon RDS

.. versionadded:: 2015.8.0

:configuration: This module accepts explicit rds credentials but can also
    utilize IAM roles assigned to the instance through Instance Profiles.
    Dynamic credentials are then automatically obtained from AWS API and no
    further configuration is necessary. More Information available at:

    .. code-block:: text

        http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html

    If IAM roles are not used you need to specify them either in a pillar or
    in the minion's config file:

    .. code-block:: yaml

        rds.keyid: GKTADJGHEIQSXMKKRBJ08H
        rds.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

    A region may also be specified in the configuration:

    .. code-block:: yaml

        rds.region: us-east-1

    If a region is not specified, the default is us-east-1.

    It's also possible to specify key, keyid and region via a profile, either
    as a passed in dict, or as a string to pull from pillars or minion config:

    .. code-block:: yaml

        myprofile:
            keyid: GKTADJGHEIQSXMKKRBJ08H
            key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
            region: us-east-1

:depends: boto3
i(tabsolute_importtprint_functiontunicode_literalsN(tSaltInvocationError(tsix(tClientErrorubotouboto3uAllocatedStorageuallocated_storageuAllowMajorVersionUpgradeuallow_major_version_upgradeuApplyImmediatelyuapply_immediatelyuAutoMinorVersionUpgradeuauto_minor_version_upgradeuAvailabilityZoneuavailability_zoneuBackupRetentionPeriodubackup_retention_perioduCACertificateIdentifieruca_certificate_identifieruCharacterSetNameucharacter_set_nameuCopyTagsToSnapshotucopy_tags_to_snapshotuDBClusterIdentifierudb_cluster_identifieruDBInstanceClassudb_instance_classuDBNameudb_nameuDBParameterGroupNameudb_parameter_group_nameuDBPortNumberudb_port_numberuDBSecurityGroupsudb_security_groupsuDBSubnetGroupNameudb_subnet_group_nameuDomainudomainuDomainIAMRoleNameudomain_iam_role_nameuEngineuengineu
EngineVersionuengine_versionuIopsuiopsuKmsKeyIdu
kms_key_iduLicenseModelu
license_modeluMasterUserPasswordumaster_user_passworduMasterUsernameumaster_usernameuMonitoringIntervalumonitoring_intervaluMonitoringRoleArnumonitoring_role_arnuMultiAZumulti_azuDBInstanceIdentifierunameuNewDBInstanceIdentifierunew_db_instance_identifieruOptionGroupNameuoption_group_nameuPortuportuPreferredBackupWindowupreferred_backup_windowuPreferredMaintenanceWindowupreferred_maintenance_windowu
PromotionTierupromotion_tieruPubliclyAccessibleupublicly_accessibleuStorageEncryptedustorage_encrypteduStorageTypeustorage_typeuTagsutagsuTdeCredentialArnutde_credential_arnuTdeCredentialPasswordutde_credential_passworduVpcSecurityGroupIdsuvpc_security_group_idscC@stjjjdd�S(ug
    Only load if boto libraries exist and if boto libraries are greater than
    a given version.
    t	boto3_veru1.3.1(tsalttutilstversionstcheck_boto_reqs(((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pyt__virtual__}scC@s1tjjjt�tr-tdtd�ndS(Nuboto3.assign_funcsurds(RRtcompattpack_dundert__name__tHAS_BOTOt	__utils__(topts((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pyt__init__�sc		C@sttd|d|d|d|�}y'|jd|�}it|�d6SWn%tk
ro}itd|�d6SXd	S(
uy
    Check to see if an RDS exists.

    CLI example::

        salt myminion boto_rds.exists myrds region=us-east-1
    tregiontkeytkeyidtprofiletDBInstanceIdentifieruexistsuboto3.get_erroruerrorN(t	_get_conntdescribe_db_instancestboolRR(	tnamettagsRRRRtconntrdste((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytexists�s!c		C@sttd|d|d|d|�}y'|jd|�}it|�d6SWn%tk
ro}itd|�d6SXd	S(
u�
    Check to see if an RDS option group exists.

    CLI example::

        salt myminion boto_rds.option_group_exists myoptiongr region=us-east-1
    RRRRtOptionGroupNameuexistsuboto3.get_erroruerrorN(Rtdescribe_option_groupsRRR(	RRRRRRRRR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytoption_group_exists�s	!c
	C@s�td|d|d|d|�}y.|jd|�}it|�d6dd6SWnRtk
r�}i}	|jdd	d
kr�t|	d<ntd|�|	d<|	SXdS(
u�
    Check to see if an RDS parameter group exists.

    CLI example::

        salt myminion boto_rds.parameter_group_exists myparametergroup                 region=us-east-1
    RRRRtDBParameterGroupNameuexistsuerroruErroruCodeuDBParameterGroupNotFounduboto3.get_errorN(Rtdescribe_db_parameter_groupsRtNoneRtresponsetFalseR(
RRRRRRRRRtresp((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytparameter_group_exists�s
!
c		C@s�y_td|d|d|d|�}|s;it|�d6S|jd|�}it|�d6SWnBtk
r�}d|jkr�itd6Sitd|�d	6SnXd
S(u�
    Check to see if an RDS subnet group exists.

    CLI example::

        salt myminion boto_rds.subnet_group_exists my-param-group                 region=us-east-1
    RRRRuexiststDBSubnetGroupNameuDBSubnetGroupNotFoundFaultuboto3.get_erroruerrorN(RRtdescribe_db_subnet_groupsRtmessageR(R(	RRRRRRRRR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytsubnet_group_exists�s
!c+9C@s|std��n|s*td��n|s?td��n|sTtd��n|sitd��n|
r�|r�td��n|r�ddd	g}+||+kr�td
j|+���q�n|	r
tdd|	d
|&d|(d|)d|*�},|r||,n|,}ny�td
|&d|(d|)d|*�}-|-sEit|-�d6Si}.ttj��}/tt�j��}0t	|�}xU|0j
|/�D]D}1t�|1}2|2d!k	r�t|1}3|3d|2�|.|3d<q�q�Wtd�t
j|.�D��}.|-j|.�}4|4sitd6S|s6itd6dj|�d6Sx�tr�d}5td|d|5d
|&d|(d|)d|*�}6t|6�r�|6d}7nitd6dj|�d6S|7|kr�itd6dj||7�d6Stjd�tjd|7�q9WWn%tk
r}8itd |8�d6SXd!S("u�
    Create an RDS Instance

    CLI example to create an RDS Instance::

        salt myminion boto_rds.create myrds 10 db.t2.micro MySQL sqlusr sqlpassw
    uallocated_storage is requiredudb_instance_class is requireduengine is requiredumaster_username is requiredu master_user_password is requiredu@availability_zone and multi_az are mutually exclusive arguments.u	availableu	modifyingu
backing-upuwait_status can be one of: {0}u"boto_secgroup.convert_to_group_idstgroupsRRRRuresultsiics@s-|]#\}}|dk	r||fVqdS(N(R&(t.0tktv((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pys	<genexpr>!sucreateduRDS instance {0} created.umessageuDBInstances[*].DBInstanceStatusRtjmespathuBRDS instance {0} should have been created but now I can't find it.uerroru-RDS instance {0} created (current status {1})i
u'Instance status after 10 seconds is: %suboto3.get_errorN(Rtformatt__salt__RRtsettboto3_param_maptkeystlocalst_tag_doctintersectionR&tdictRt	iteritemstcreate_db_instanceR(tTrueRtlenttimetsleeptlogtinfoRR(9Rtallocated_storagetdb_instance_classtenginetmaster_usernametmaster_user_passwordtdb_nametdb_security_groupstvpc_security_group_idstvpc_security_groupstavailability_zonetdb_subnet_group_nametpreferred_maintenance_windowtdb_parameter_group_nametbackup_retention_periodtpreferred_backup_windowtporttmulti_aztengine_versiontauto_minor_version_upgradet
license_modeltiopstoption_group_nametcharacter_set_nametpublicly_accessibletwait_statusRtdb_cluster_identifiertstorage_typettde_credential_arnttde_credential_passwordtstorage_encryptedt
kms_key_idtdomaintcopy_tags_to_snapshottmonitoring_intervaltmonitoring_role_arntdomain_iam_role_nameRtpromotion_tierRRRt
wait_statitv_tmpRtkwargstboto_paramsR8t	param_keytvaltmappedRR3tstatuststatR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytcreate�sx
	!


		



cC@s tstd��ntd||	||||�}|jd�sdit|�d6dj|�d6Std||	||||�}|jd�r�it|�d6dj|�d6SyAtd|d|d	|d
|�}i}x;dD]3}t�|dk	r�t	t�|�||<q�q�Wx;dD]3}t�|dk	r"t
t�|�||<q"q"Wx;dD]3}t�|dk	r`tt�|�||<q`q`Wt|	�}|jd|d|d|d|d|d|d|
d||�}it|�d6SWn%t
k
r}itd|�d6SXdS( u�
    Create an RDS read replica

    CLI example to create an RDS  read replica::

        salt myminion boto_rds.create_read_replica replicaname source_name
    u#backup_retention_period is requireduboto_rds.existsuexistsu(RDS instance source {0} does not exists.umessageu(RDS replica instance {0} already exists.RRRRuOptionGroupNameuMonitoringRoleArnuMonitoringIntervaluIopsuPortuCopyTagsToSnapshotuAutoMinorVersionUpgradeRtSourceDBInstanceIdentifiertDBInstanceClasstAvailabilityZonetPubliclyAccessibletTagsR+tStorageTypeuboto3.get_erroruerrorN(uOptionGroupNameuMonitoringRoleArn(uMonitoringIntervaluIopsuPort(uCopyTagsToSnapshotuAutoMinorVersionUpgrade(RRRR5tgetRR4RR9R&tstrtintR:tcreate_db_instance_read_replicaRR(Rtsource_nameRFRNRTRWRYRZR\RROR_ReRfRgRRRRtresRRlttaglisttrds_replicaR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytcreate_read_replicaBsD!


	c	C@s�td||||||�}	|	jd�r?it|	�d6Sy�td|d|d|d|�}
|
szit|
�d6St|�}|
jd|d	|d
|d|d|�}it|�d6SWn%tk
r�}
itd
|
�d6SXdS(u�
    Create an RDS option group

    CLI example to create an RDS option group::

        salt myminion boto_rds.create_option_group my-opt-group mysql 5.6                 "group description"
    uboto_rds.option_group_existsuexistsRRRRuresultsR!t
EngineNametMajorEngineVersiontOptionGroupDescriptionRxuboto3.get_erroruerrorN(R5RzRRR:tcreate_option_groupRR(Rtengine_nametmajor_engine_versiontoption_group_descriptionRRRRRRRR�RR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pyR�|s"	!	c
	C@std||||||�}|jd�r?it|�d6Sy�td|d|d|d|�}	|	szit|	�d6St|�}
|	jd|d	|d
|d|
�}|s�itd6d
j|�d6Sit|�d6dj|�d6SWn%tk
r}it	d|�d6SXdS(u�
    Create an RDS parameter group

    CLI example to create an RDS parameter group::

        salt myminion boto_rds.create_parameter_group my-param-group mysql5.6                 "group description"
    uboto_rds.parameter_group_existsuexistsRRRRuresultsR$tDBParameterGroupFamilytDescriptionRxucreatedu(Failed to create RDS parameter group {0}umessageuCreated RDS parameter group {0}uboto3.get_erroruerrorN(
R5RzRRR:tcreate_db_parameter_groupR(R4RR(
Rtdb_parameter_group_familytdescriptionRRRRRRRR�RR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytcreate_parameter_group�s(!	
c
	C@s�td||||||�}|jd�r?it|�d6Sy}td|d|d|d|�}	|	szit|	�d6St|�}
|	jd|d	|d
|d|
�}it|�d6SWn%tk
r�}itd
|�d6SXdS(u�
    Create an RDS subnet group

    CLI example to create an RDS subnet group::

        salt myminion boto_rds.create_subnet_group my-subnet-group             "group description" '[subnet-12345678, subnet-87654321]'             region=us-east-1
    uboto_rds.subnet_group_existsuexistsRRRRuresultsR+tDBSubnetGroupDescriptiont	SubnetIdsRxucreateduboto3.get_erroruerrorN(R5RzRRR:tcreate_db_subnet_groupRR(
RR�t
subnet_idsRRRRRRRR�RR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytcreate_subnet_group�s!upending-rebootc	C@s�td||||||�}|jd�sOit|�d6dj|�d6Sg}	x�tj|�D]�\}}
tj�}|ji|d6�|ji|d6�t	|
�tkr�|ji|
r�dndd	6�n|jit
|
�d	6�|	j|�qeWt|	�sit
d
6Syetd|d|d
|d|�}|sWit|�d
6S|jd|d|	�}it|�d
6SWn%tk
r�}
itd|
�d6SXdS(u�
    Update an RDS parameter group.

    CLI example::

        salt myminion boto_rds.update_parameter_group my-param-group                 parameters='{"back_log":1, "binlog_cache_size":4096}'                 region=us-east-1
    uboto_rds.parameter_group_existsuexistsu'RDS parameter group {0} does not exist.umessageu
ParameterNameuApplyMethoduonuoffuParameterValueuresultsRRRRR$t
Parametersuboto3.get_erroruerrorN(R5RzRR4RR=todicttOrderedDicttupdatettypeR{tappendR@R(Rtmodify_db_parameter_groupRR(Rt
parameterstapply_methodRRRRRRt
param_listtvaluetitemRR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytupdate_parameter_group�s2
#!	c
C@sntd||||||�}|jd�sOit|�d6dj|�d6Sy�td|d|d|d|�}|s�it|�d	6S|jd
|�}g|jdg�D]!}	|	jd�|kr�|	^q�jd
�}|rd/}
itg|
D]}||j|�f^q��d+6Sid.d+6SWn=t	k
rQ}it
d,|�d-6Stk
riid.d+6SXd.S(0ui
    Return RDS instance details.

    CLI example::

        salt myminion boto_rds.describe myrds

    uboto_rds.existsuexistsu RDS instance {0} does not exist.umessageRRRRuresultsRuDBInstancesuDBInstanceIdentifieriuDBInstanceClassuEngineuDBInstanceStatusuDBNameuAllocatedStorageuPreferredBackupWindowuBackupRetentionPerioduAvailabilityZoneuPreferredMaintenanceWindowuLatestRestorableTimeu
EngineVersionuAutoMinorVersionUpgradeuLicenseModeluIopsuCharacterSetNameuPubliclyAccessibleuStorageTypeuTdeCredentialArnuDBInstancePortuDBClusterIdentifieruStorageEncrypteduKmsKeyIdu
DbiResourceIduCACertificateIdentifieruCopyTagsToSnapshotuMonitoringIntervaluMonitoringRoleArnu
PromotionTieruDomainMembershipsurdsuboto3.get_erroruerrorN(uDBInstanceIdentifieruDBInstanceClassuEngineuDBInstanceStatusuDBNameuAllocatedStorageuPreferredBackupWindowuBackupRetentionPerioduAvailabilityZoneuPreferredMaintenanceWindowuLatestRestorableTimeu
EngineVersionuAutoMinorVersionUpgradeuLicenseModeluIopsuCharacterSetNameuPubliclyAccessibleuStorageTypeuTdeCredentialArnuDBInstancePortuDBClusterIdentifieruStorageEncrypteduKmsKeyIdu
DbiResourceIduCACertificateIdentifieruCopyTagsToSnapshotuMonitoringIntervaluMonitoringRoleArnu
PromotionTieruDomainMemberships(R5RzRR4RRtpopR<R&RRt
IndexError(
RRRRRRRRRtiR8R1R((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytdescribe
sB
	!!	3
uDBInstancesc	C@s"td|d|d|d|�}|jd�}i}	|rR|	ji|d6�nd
|rr|	ji|d6�nd
|j|	�}
|r�|
j|�n|
}
yg|
D]}|^q�SWn`tk
r}t|di�jd	i�jd
�}
|
dkrt	j
td|��qnXgS(u]
    Return a detailed listing of some, or all, DB Instances visible in the
    current scope.  Arbitrary subelements or subsections of the returned dataset
    can be selected by passing in a valid JMSEPath filter as well.

    CLI example::

        salt myminion boto_rds.describe_db_instances jmespath='DBInstances[*].DBInstanceIdentifier'

    RRRRudescribe_db_instancesuDBInstanceIdentifieruFiltersuresponseuErroruCodeuDBInstanceNotFounduboto3.get_errorN(Rt
get_paginatorR�R&tpaginatetsearchRtgetattrRzRCterrorR(RtfiltersR3RRRRRtpagtargstpittpRtcode((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pyR?s!  'uDBSubnetGroupsc	C@s�td|d|d|d|�}|jd�}i}	|rR|	ji|d6�nd|rr|	ji|d6�nd|j|	�}
|r�|
j|�n|
}
g|
D]}|^q�S(	u6
    Return a detailed listing of some, or all, DB Subnet Groups visible in the
    current scope.  Arbitrary subelements or subsections of the returned dataset
    can be selected by passing in a valid JMSEPath filter as well.

    CLI example::

        salt myminion boto_rds.describe_db_subnet_groups

    RRRRudescribe_db_subnet_groupsuDBSubnetGroupNameuFiltersN(RR�R�R&R�R�(RR�R3RRRRRR�R�R�R�((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pyR,[s!  c	C@s�t}td||||||�}|jd�r�yttd|d|d|d|�}|r�|jd|�}	|	r�d|	d	d
kr�|	d	d
dd}|SnWq�tk
r�}
itd|
�d
6SXn|S(ux
    Return the endpoint of an RDS instance.

    CLI example::

        salt myminion boto_rds.get_endpoint myrds

    uboto_rds.existsuexistsRRRRRuEndpointuDBInstancesiuAddressuboto3.get_erroruerror(R(R5RzRRRR(RRRRRRtendpointRRRR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytget_endpointqs
	!i�c
C@s|	dkr|rd}	n|r9|r9td��ny�td|d|d|d|�}
|
stit|
�d6Si}t�d	dk	r�tt�d	�|d
<nt�ddk	r�tt�d�|d<n|
jd
||�}|sit|�d6dj|�d6Stj�}
x�t	r�t
dd|d|d|d|d|d|�}|jd�s�it|�d6dj|�d6Stj�|
|	kr�tdj||	���ntj
d|	|�tjd�qWWn%tk
r}itd|�d6SXdS(u�
    Delete an RDS instance.

    CLI example::

        salt myminion boto_rds.delete myrds skip_final_snapshot=True                 region=us-east-1
    i�i�uaAt least one of the following must be specified: skip_final_snapshot final_db_snapshot_identifierRRRRudeleteduskip_final_snapshotuSkipFinalSnapshotufinal_db_snapshot_identifieruFinalDBSnapshotIdentifierRuDeleted RDS instance {0}.umessageuboto_rds.existsRRuexistsu$Deleted RDS instance {0} completely.uBRDS instance {0} has not been deleted completely after {1} secondsu;Waiting up to %s seconds for RDS instance %s to be deleted.i
uboto3.get_erroruerrorN(RRRR9R&R{tdelete_db_instanceR4RAR?R5RzRCRDRBRR(Rtskip_final_snapshottfinal_db_snapshot_identifierRRRRRtwait_for_deletionttimeoutRRlRt
start_timeR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytdelete�sB	!				
c	C@s�y�td|d|d|d|�}|s;it|�d6S|jd|�}|stit|�d6dj|�d6Sit|�d6d	j|�d6SWn%tk
r�}itd
|�d6SXdS(
u�
    Delete an RDS option group.

    CLI example::

        salt myminion boto_rds.delete_option_group my-opt-group                 region=us-east-1
    RRRRudeletedR!u&Failed to delete RDS option group {0}.umessageuDeleted RDS option group {0}.uboto3.get_erroruerrorN(RRtdelete_option_groupR4RR(RRRRRRRR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pyR��s	!c	C@s�yotd|d|d|d|�}|s;it|�d6S|jd|�}it|�d6dj|�d	6SWn%tk
r�}itd
|�d6SXdS(
u�
    Delete an RDS parameter group.

    CLI example::

        salt myminion boto_rds.delete_parameter_group my-param-group                 region=us-east-1
    RRRRuresultsR$udeletedu Deleted RDS parameter group {0}.umessageuboto3.get_erroruerrorN(RRtdelete_db_parameter_groupR4RR(RRRRRRtrR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytdelete_parameter_group�s
!c	C@s�yotd|d|d|d|�}|s;it|�d6S|jd|�}it|�d6dj|�d	6SWn%tk
r�}itd
|�d6SXdS(
u�
    Delete an RDS subnet group.

    CLI example::

        salt myminion boto_rds.delete_subnet_group my-subnet-group                 region=us-east-1
    RRRRuresultsR+udeleteduDeleted RDS subnet group {0}.umessageuboto3.get_erroruerrorN(RRtdelete_db_subnet_groupR4RR(RRRRRRR�R((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytdelete_subnet_group�s
!c
C@s�td|ddd|d|d|d|�}|jd�sNit|�d6Sy
td|d|d|d|�}	|	s�it|	�d6Si}
x;dD]3}t�|dk	r�tt�|�|
|<q�q�Wt�ddk	r�tt�d�|
d<n|	jd||
�}|s6it|�d6d
j	|�d6Sit|�d6dj	|�d6SWn%t
k
r}itd|�d6SXdS(u�
    Returns a list of `DBParameterGroup` descriptions.
    CLI example to description of parameter group::

        salt myminion boto_rds.describe_parameter_group parametergroupname            region=us-east-1
    uboto_rds.parameter_group_existsRRRRRuexistsuresultsuMarkeruFiltersu
MaxRecordsR$u,Failed to get RDS description for group {0}.umessageu!Got RDS descrition for group {0}.uboto3.get_erroruerrorN(uMarkeruFilters(R5R&RzRRR9R{R|R%R4RR(
RtFilterst
MaxRecordstMarkerRRRRRRRlRDR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytdescribe_parameter_groups2		!
	cC@std|ddd|d|d|d|�}|jd�sXitd6d	j|�d
6Sy�td|d|d|d|�}	|	s�itd6dd
6Si}
|
ji|d6�x;dD]3}t�|dk	r�tt�|�|
|<q�q�Wt�ddk	rt	t�d�|
d<n|	j
d�}|j|
�}ddddddddddg
}
tj
�}itd6}xf|D]^}xU|dD]I}tj
�}x!|
D]}|j|�||<q�W|||jd�<q�Wq{W||d<|SWn%tk
r}itd|�d6SXdS( u�
    Returns a list of `DBParameterGroup` parameters.
    CLI example to description of parameters ::

        salt myminion boto_rds.describe_parameters parametergroupname            region=us-east-1
    uboto_rds.parameter_group_existsRRRRRuexistsuresultu"Parameter group {0} does not existumessageu'Could not establish a connection to RDSuDBParameterGroupNameuMarkeruSourceu
MaxRecordsudescribe_db_parametersu
ParameterNameuParameterValueuDescriptionu	ApplyTypeuDataTypeu
AllowedValuesu
IsModifieableuMinimumEngineVersionuApplyMethodu
Parametersu
parametersuboto3.get_erroruerrorN(uMarkeruSource(R5R&RzR(R4RR�R9R{R|R�R�R�R�R?RR(RtSourceR�R�RRRRRRRlR�R�R8R�tretR�tresulttdataR1R((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pytdescribe_parameters6sH		
!

	



c)3C@s�td|ddd|%d|&d|'d|(�})|)jd�sXitd6d	j|�d
6Sy:td|%d|&d|'d|(�}*|*s�itd6Si}+td�},ttj��}-tt	�j��}.x^|.j
|-�j|,�D]D}&t	�|&}/|/dk	r�t|&}0|0d|/�|+|0d
<q�q�W|*jd||+�}1|1scit
|1�d6dj|�d
6Sit
|1�d6dj|�d
6t|1�d6SWn%tk
r�}2itd|2�d6SXdS(u�
    Modify settings for a DB instance.
    CLI example to description of parameters ::

        salt myminion boto_rds.modify_db_instance db_instance_identifier region=us-east-1
    uboto_rds.existsRRRRRuexistsumodifiedu#RDS db instance {0} does not exist.umessageunameiiRu%Failed to modify RDS db instance {0}.uModified RDS db instance {0}.uresultsuboto3.get_erroruerrorN(uname(R5R&RzR(R4RR6R7R8R9R;t
differencetmodify_db_instanceRR<RR(3RREtallow_major_version_upgradetapply_immediatelyRWRRtca_certificate_identifierR[ReR^RFRJRQtdb_port_numberRKRORdRhRVRYRcRXRIRfRgRUtnew_db_instance_identifierRZRSRPRiR\RbR_R`RaRLRRRRRRRltexcludedRmR8RoRpRDR((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pyR�ns4,.
!

cC@s�g}|dk	r�xktj|�D]W\}}tj|�jd�rLq"n|jitj|�d6tj|�d6�q"Wn|S(Nu__uKeyuValue(R&RR=t	text_typet
startswithR�(RR�R1R2((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pyR:�s4(<t__doc__t
__future__RRRtloggingRAtsalt.utils.compatRtsalt.utils.odictRR�tsalt.utils.versionstsalt.exceptionsRt	getLoggerRRCtsalt.extRtbototboto3tbotocore.exceptionsRtsetLeveltCRITICALR?RtImportErrorR(R|RR{tlistR7RRR&R R#R*R.RsR�R�R�R�R�R�RR,R�R�R�R�R�R�R�R�R:(((s9/usr/lib/python2.7/site-packages/salt/modules/boto_rds.pyt<module>+s@











































	
							T4 "+1		7			)	8(

Zerion Mini Shell 1.0