我有这个我正在尝试检查的测试,但似乎 EnableIAMDatabaseAuthentication 没有被传递给 moto
@mock_rds
def test_iam_database_authentication_enabled(self):
print(self.client.create_db_instance(
DBInstanceIdentifier='db-master-1',
AllocatedStorage=10,
Engine='postgres',
DBInstanceClass='db.m1.small',
EnableIAMDatabaseAuthentication=True,
MasterUsername='root',
MasterUserPassword='hunter2',
Port=1234,
))
{'DBInstance':{'DBInstanceIdentifier':'db-master-1','DBInstanceClass':'db.m1.small','Engine':'postgres','DBInstanceStatus':'available','MasterUsername': 'root', 'Endpoint': {'Address': 'db-master-1.aaaaaaaaaa.us-east-2.rds.amazonaws.com', 'Port': 1234}, 'AllocatedStorage': 10, 'InstanceCreateTime ': datetime.datetime(2020, 1, 13, 13, 1, 10, 665000, tzinfo=tzutc()), 'PreferredBackupWindow': '03:50-04:20', 'BackupRetentionPeriod': 1, 'DBSecurityGroups' :[],'VpcSecurityGroups':[],'DBParameterGroups':[{'DBParameterGroupName':'default.postgres9.3','ParameterApplyStatus':'同步中'}],'PreferredMaintenanceWindow': 'wed:06:38-wed:07:08', 'MultiAZ': False, 'EngineVersion': '9.3.3', 'AutoMinorVersionUpgrade': False, 'ReadReplicaDBInstanceIdentifiers': [], 'LicenseModel': 'general-public-license', 'OptionGroupMemberships': [{'OptionGroupName': 'default.postgres9.3', 'Status': 'in-sync'}], 'PubliclyAccessible': False, 'StatusInfos': [] , 'StorageType': 'gp2', 'StorageEncrypted': False, 'DbiResourceId': 'db-M5ENSHXFPU6XHZ4G4ZEI5QIO2U', 'CopyTagsToSnapshot': False, 'DBInstanceArn': 'arn:aws:rds:us-east-2:1234567890: db:db-master-1', 'IAMDatabaseAuthenticationEnabled': False}, 'ResponseMetadata': {'RequestId':'523e3218-afc7-11c3-90f5-f90431260ab4', 'HTTPStatusCode': 200, 'HTTPHeaders': {'server': 'amazon.com'}, 'RetryAttempts': 0}}
尝试传递 EnableIAMDatabaseAuthentication 参数时我做错了吗?它应该设置:IAMDatabaseAuthenticationEnabled