public static DeleteUserPoliciesForUser ( |
||
client | ||
username | string | |
return | void |
public static void DeleteUserPoliciesForUser(AmazonIdentityManagementServiceClient client, string username)
{
ListUserPoliciesResponse response =
client.ListUserPoliciesAsync(new ListUserPoliciesRequest() { UserName = username }).Result;
foreach (string pName in response.PolicyNames)
{
client.DeleteUserPolicyAsync(new DeleteUserPolicyRequest() { UserName = username, PolicyName = pName }).Wait();
}
}