python封裝阿里雲API
本代碼,由參加黃哥python視頻培訓的一位運維學員所寫。
GitHub - leonanu/AliyunSDK: Aliyun API SDK written in Python
AliyunSDK is an Aliyun ECS, SLB and RDS API SDK library, written in Python.nnRequirementnnPython 2.6/2.7nnInstallnnpython setup.py installnExample:nn>>> import AliyunSDKn>>> rds = AliyunSDK.RDS(access_id, access_secret)n>>> ret = rds.show_instance_info(db_instance_id)n>>> pprint.pprint(ret)nn{uAccountMaxQuantity: 500,n uAccountType: uNormal,n uAvailabilityValue: u100.0%,n uConnectionMode: uSafe,n uConnectionString: ubp1d2dsj7dh930dn93ze7.mysql.rds.aliyuncs.com,n uCreationTime: u2016-05-31T03:38:05Z,n uDBInstanceCPU: u4,n uDBInstanceClass: urds.mysql.s3.large,n uDBInstanceClassType: ux,n uDBInstanceDescription: utest_db,n uDBInstanceId: ubp1d2dsj7dh930dn93ze7,n uDBInstanceMemory: 8192,n uDBInstanceNetType: uIntranet,n uDBInstanceStatus: uRunning,n uDBInstanceStorage: 500,n uDBInstanceType: uPrimary,n uDBMaxQuantity: 500,n uEngine: uMySQL,n uEngineVersion: u5.6,n uExpireTime: u2016-06-30T16:00:00Z,n uInsId: 1,n uInstanceNetworkType: uClassic,n uLockMode: uUnlock,n uMaintainTime: u18:00Z-22:00Z,n uMaxConnections: 2000,n uMaxIOPS: 5000,n uPayType: uPrepaid,n uPort: u3306,n uReadOnlyDBInstanceIds: {uReadOnlyDBInstanceId: []},n uRegionId: ucn-hangzhou,n uSecurityIPList: u10.23.5.6,10.23.4.67,n uSupportUpgradeAccountType: uNo,n uVpcId: u,n uZoneId: ucn-hangzhou-MAZ1(b,c)}n
推薦閱讀:
TAG:Python |