public ListUserPolicies ( ListUserPoliciesRequest request ) : ListUserPoliciesResponse | ||
request | ListUserPoliciesRequest | Container for the necessary parameters to execute the ListUserPolicies service method. |
return | ListUserPoliciesResponse |
public static void DeleteUserPoliciesForUser(AmazonIdentityManagementServiceClient client, string username) { ListUserPoliciesResponse response = client.ListUserPolicies(new ListUserPoliciesRequest() { UserName = username }); foreach (string pName in response.PolicyNames) { client.DeleteUserPolicy(new DeleteUserPolicyRequest() { UserName = username, PolicyName = pName }); } }