def ec2_credentials_delete(user_id=None, name=None, access_key=None, profile=None, **connection_args):
 kstone = auth(profile, **connection_args)
 if name:
  user_id = user_get(name=name, profile=None, **connection_args)[name]['id']
 if (not user_id):
  return {'Error': 'Could not resolve User ID'}
 kstone.ec2.delete(user_id, access_key)
 return 'ec2 key "{0}" deleted under user id "{1}"'.format(access_key, user_id)

def ec2_credentials_delete ( user_id = None , name = None , access_key = None , profile = None , ** connection_args ) : kstone = auth ( profile , ** connection_args ) if name : user_id = user_get ( name = name , profile = None , ** connection_args ) [ name ] [ 'id' ] if ( not user_id ) : return { 'Error' : 'Could not resolve User ID' } kstone . ec2 . delete ( user_id , access_key ) return 'ec2 key "{0}" deleted under user id "{1}"' . format ( access_key , user_id )
delete ec2-compatible credentials cli examples: .