使用Boto3显示给定IAM角色名称的IAM内联策略名称

时间:2020-09-18 23:21:49

标签: boto3 amazon-iam

我无法从https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html中找到以IAM角色显示内联策略名称的方法。

我有显示内联策略文档的代码,但这不是我想要的。

不是此代码,但以后会需要此代码

String sql = "select p.nombre_paciente, p.apellido_paciente, p.nacimiento_paciente, p.edad_paciente, p.cedula_paciente, p.profesion_paciente,p.dlaboral_paciente,p.dparticular_paciente,p.tlaboral_paciente,p.tparticular_paciente,c.idcivil,c.tipo,**p.id_paciente** from paciente p inner join civil c on p.idcivil = c.idcivil where upper(nombre_paciente) like '%" + nombre.toUpperCase() + "%'"
                    + " order by id_paciente offset " + offset + " limit " + utiles.Utiles.REGISTROS_PAGINA;
    System.out.println("--->" + sql);
    try (PreparedStatement ps = Conexion.getConn().prepareStatement(sql)) {
        ResultSet rs = ps.executeQuery();
        String tabla = "";
        while (rs.next()) {
            tabla += "<tr>"
            + "<td>" + rs.getInt("id_paciente") + "</td>"
            + "<td>" + rs.getString("nombre_paciente") + "</td>"
            + "<td>" + rs.getString("apellido_paciente") + "</td>"
            + "<td>" + rs.getDate("nacimiento_paciente") + "</td>"
            + "<td>" + rs.getInt("edad_paciente") + "</td>"
            + "<td>" + rs.getString("cedula_paciente") + "</td>"
            + "<td>" + rs.getString("profesion_paciente") + "</td>"
            + "<td>" + rs.getString("dlaboral_paciente") + "</td>"
            + "<td>" + rs.getString("dparticular_paciente") + "</td>"
            + "<td>" + rs.getString("tlaboral_paciente") + "</td>"
            + "<td>" + rs.getString("tparticular_paciente") + "</td>"
            + "<td>" + rs.getInt("idcivil") + "</td>"
            + "<td>" + rs.getString("tipo") + "</td>"
            + "</tr>";

1 个答案:

答案 0 :(得分:0)

一个小时后,我终于开始工作了。真是的!

response = client.list_role_policies(
    RoleName='MyRole'
)

print(response)